summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc7
-rw-r--r--webkit/tools/test_shell/layout_test_controller.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 9b355ed..6f91aaa 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -101,6 +101,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) :
BindMethod("setCloseRemainingWindowsWhenComplete", &LayoutTestController::setCloseRemainingWindowsWhenComplete);
BindMethod("objCIdentityIsEqual", &LayoutTestController::objCIdentityIsEqual);
BindMethod("setAlwaysAcceptCookies", &LayoutTestController::setAlwaysAcceptCookies);
+ BindMethod("showWebInspector", &LayoutTestController::showWebInspector);
BindMethod("setWindowIsKey", &LayoutTestController::setWindowIsKey);
BindMethod("setTabKeyCyclesThroughElements", &LayoutTestController::setTabKeyCyclesThroughElements);
BindMethod("setUserStyleSheetLocation", &LayoutTestController::setUserStyleSheetLocation);
@@ -561,6 +562,12 @@ void LayoutTestController::setAlwaysAcceptCookies(
result->SetNull();
}
+void LayoutTestController::showWebInspector(
+ const CppArgumentList& args, CppVariant* result) {
+ shell_->ShowDevTools();
+ result->SetNull();
+}
+
void LayoutTestController::setWindowIsKey(
const CppArgumentList& args, CppVariant* result) {
if (args.size() > 0 && args[0].isBool()) {
diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h
index 373db0a..7e88d80 100644
--- a/webkit/tools/test_shell/layout_test_controller.h
+++ b/webkit/tools/test_shell/layout_test_controller.h
@@ -99,6 +99,9 @@ class LayoutTestController : public CppBoundClass {
// Changes the cookie policy from the default to allow all cookies.
void setAlwaysAcceptCookies(const CppArgumentList& args, CppVariant* result);
+ // Shows DevTools window.
+ void showWebInspector(const CppArgumentList& args, CppVariant* result);
+
// Gives focus to the window.
void setWindowIsKey(const CppArgumentList& args, CppVariant* result);