summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/layout_test_controller.cc
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-15 10:51:23 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-15 10:51:23 +0000
commitac863a026dcce485a87698d0489c05e4c2baf889 (patch)
tree07b87bc3392dd64ce64dff9fef890b20c0d713f8 /webkit/tools/test_shell/layout_test_controller.cc
parent060d4d8b30d19a4b5113ee4ceeefd49df0407967 (diff)
downloadchromium_src-ac863a026dcce485a87698d0489c05e4c2baf889.zip
chromium_src-ac863a026dcce485a87698d0489c05e4c2baf889.tar.gz
chromium_src-ac863a026dcce485a87698d0489c05e4c2baf889.tar.bz2
DevTools: Add support for inspector layout tests. Step 3.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34544 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index bdac11f..9ca297e 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -28,6 +28,7 @@
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell.h"
+#include "webkit/tools/test_shell/test_shell_devtools_agent.h"
using std::string;
using std::wstring;
@@ -143,6 +144,8 @@ LayoutTestController::LayoutTestController(TestShell* shell) :
BindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
BindMethod("overridePreference", &LayoutTestController::overridePreference);
BindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
+ BindMethod("setTimelineProfilingEnabled", &LayoutTestController::setTimelineProfilingEnabled);
+ BindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
// The fallback method is called when an unknown method is invoked.
BindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -1030,3 +1033,21 @@ void LayoutTestController::LogErrorToConsole(const std::string& text) {
WebString::fromUTF8(text)),
WebString(), 0);
}
+
+void LayoutTestController::setTimelineProfilingEnabled(
+ const CppArgumentList& args, CppVariant* result) {
+ result->SetNull();
+ if (args.size() < 1 || !args[0].isBool())
+ return;
+ shell_->dev_tools_agent()->setTimelineProfilingEnabled(args[0].ToBoolean());
+}
+
+void LayoutTestController::evaluateInWebInspector(const CppArgumentList& args,
+ CppVariant* result) {
+ result->SetNull();
+ if (args.size() < 2 || !args[0].isInt32() || !args[1].isString())
+ return;
+ shell_->dev_tools_agent()->evaluateInWebInspector(args[0].ToInt32(),
+ args[1].ToString());
+}
+