summaryrefslogtreecommitdiffstats
path: root/WebKitTools/WebKitTestRunner/InjectedBundle
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2010-11-10 15:31:59 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2010-11-17 13:35:59 -0800
commit28040489d744e0c5d475a88663056c9040ed5320 (patch)
treec463676791e4a63e452a95f0a12b2a8519730693 /WebKitTools/WebKitTestRunner/InjectedBundle
parenteff9be92c41913c92fb1d3b7983c071f3e718678 (diff)
downloadexternal_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebKitTools/WebKitTestRunner/InjectedBundle')
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl2
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp2
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp12
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h4
4 files changed, 18 insertions, 2 deletions
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
index a0e36ad..583eb0a 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -64,6 +64,8 @@ module WTR {
// Animation testing.
int numberOfActiveAnimations();
boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
+ void suspendAnimations();
+ void resumeAnimations();
// UserContent testing.
void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames);
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
index b1bc89d..c4cf892 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
@@ -31,7 +31,7 @@ extern "C" __declspec(dllexport)
#else
extern "C"
#endif
-void WKBundleInitialize(WKBundleRef bundle)
+void WKBundleInitialize(WKBundleRef bundle, WKTypeRef initializationUserData)
{
WTR::InjectedBundle::shared().initialize(bundle);
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index e828c46..de37383 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -150,6 +150,18 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
return WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time);
}
+void LayoutTestController::suspendAnimations()
+{
+ WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
+ WKBundleFrameSuspendAnimations(mainFrame);
+}
+
+void LayoutTestController::resumeAnimations()
+{
+ WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
+ WKBundleFrameResumeAnimations(mainFrame);
+}
+
JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const
{
WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index dfafb55..427d05e 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -91,7 +91,9 @@ public:
// Animation testing.
unsigned numberOfActiveAnimations() const;
bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
-
+ void suspendAnimations();
+ void resumeAnimations();
+
// Compositing testing.
JSRetainPtr<JSStringRef> layerTreeAsText() const;