Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 16216: Adds support for pauseAnimationAtTimeOnElementWithId and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/layout_test_controller.cc
===================================================================
--- webkit/tools/test_shell/layout_test_controller.cc (revision 7359)
+++ webkit/tools/test_shell/layout_test_controller.cc (working copy)
@@ -14,6 +14,7 @@
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#include "webkit/glue/dom_operations.h"
#include "webkit/glue/webframe.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview.h"
@@ -97,6 +98,8 @@
BindMethod("setStopProvisionalFrameLoads", &LayoutTestController::setStopProvisionalFrameLoads);
BindMethod("setSmartInsertDeleteEnabled", &LayoutTestController::setSmartInsertDeleteEnabled);
BindMethod("setSelectTrailingWhitespaceEnabled", &LayoutTestController::setSelectTrailingWhitespaceEnabled);
+ BindMethod("pauseAnimationAtTimeOnElementWithId", &LayoutTestController::pauseAnimationAtTimeOnElementWithId);
+ BindMethod("pauseTransitionAtTimeOnElementWithId", &LayoutTestController::pauseTransitionAtTimeOnElementWithId);
// The following are stubs.
BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive);
@@ -568,6 +571,39 @@
result->SetNull();
}
+void LayoutTestController::pauseAnimationAtTimeOnElementWithId(
+ const CppArgumentList& args,
+ CppVariant* result) {
+ if (args.size() > 2 && args[0].isString() && args[1].isNumber() &&
+ args[2].isString()) {
+ std::string animation_name = args[0].ToString();
+ double time = args[1].ToDouble();
+ std::string element_id = args[2].ToString();
+
+ result->Set(
+ webkit_glue::PauseAnimationAtTimeOnElementWithId(
+ shell_->webView(), animation_name, time, element_id));
+ } else {
+ result->Set(false);
+ }
+}
+
+void LayoutTestController::pauseTransitionAtTimeOnElementWithId(
+ const CppArgumentList& args,
+ CppVariant* result) {
+ if (args.size() > 2 && args[0].isString() && args[1].isNumber() &&
+ args[2].isString()) {
+ std::string property_name = args[0].ToString();
+ double time = args[1].ToDouble();
+ std::string element_id = args[2].ToString();
+
+ webkit_glue::PauseTransitionAtTimeOnElementWithId(
+ shell_->webView(), property_name, time, element_id);
+ } else {
+ result->Set(false);
+ }
+}
+
//
// Unimplemented stubs
//
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698