| Index: webkit/tools/test_shell/layout_test_controller.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/layout_test_controller.cc (revision 57932)
|
| +++ webkit/tools/test_shell/layout_test_controller.cc (working copy)
|
| @@ -15,6 +15,7 @@
|
| #include "base/path_service.h"
|
| #include "base/string_number_conversions.h"
|
| #include "base/utf_string_conversions.h"
|
| +#include "third_party/WebKit/WebKit/chromium/public/WebAnimationController.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebDocument.h"
|
| @@ -129,6 +130,8 @@
|
| BindMethod("setSelectTrailingWhitespaceEnabled", &LayoutTestController::setSelectTrailingWhitespaceEnabled);
|
| BindMethod("pauseAnimationAtTimeOnElementWithId", &LayoutTestController::pauseAnimationAtTimeOnElementWithId);
|
| BindMethod("pauseTransitionAtTimeOnElementWithId", &LayoutTestController::pauseTransitionAtTimeOnElementWithId);
|
| + BindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
|
| + BindMethod("resumeAnimations", &LayoutTestController::resumeAnimations);
|
| BindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
|
| BindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations);
|
| BindMethod("disableImageLoading", &LayoutTestController::disableImageLoading);
|
| @@ -829,6 +832,34 @@
|
| }
|
| }
|
|
|
| +void LayoutTestController::suspendAnimations(
|
| + const CppArgumentList& args, CppVariant* result) {
|
| + result->SetNull();
|
| +
|
| + WebKit::WebFrame* web_frame = shell_->webView()->mainFrame();
|
| + if (!web_frame)
|
| + return;
|
| +
|
| + WebKit::WebAnimationController* controller = web_frame->animationController();
|
| + if (!controller)
|
| + return;
|
| + controller->suspendAnimations();
|
| +}
|
| +
|
| +void LayoutTestController::resumeAnimations(
|
| + const CppArgumentList& args, CppVariant* result) {
|
| + result->SetNull();
|
| +
|
| + WebKit::WebFrame* web_frame = shell_->webView()->mainFrame();
|
| + if (!web_frame)
|
| + return;
|
| +
|
| + WebKit::WebAnimationController* controller = web_frame->animationController();
|
| + if (!controller)
|
| + return;
|
| + controller->resumeAnimations();
|
| +}
|
| +
|
| void LayoutTestController::elementDoesAutoCompleteForElementWithId(
|
| const CppArgumentList& args,
|
| CppVariant* result) {
|
|
|