summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/test_shell.cc3
-rw-r--r--webkit/tools/test_shell/test_shell.h7
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc4
3 files changed, 12 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 69455ae..c9f5170 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -103,6 +103,7 @@ class URLRequestTestShellFileJob : public URLRequestFileJob {
// Initialize static member variable
WindowList* TestShell::window_list_;
WebPreferences* TestShell::web_prefs_ = NULL;
+bool TestShell::developer_extras_enabled_ = false;
bool TestShell::inspector_test_mode_ = false;
bool TestShell::layout_test_mode_ = false;
int TestShell::file_test_timeout_ms_ = kDefaultFileTestTimeoutMillisecs;
@@ -470,7 +471,7 @@ void TestShell::ResetWebPreferences() {
web_prefs_->javascript_can_open_windows_automatically = true;
web_prefs_->dom_paste_enabled = true;
web_prefs_->developer_extras_enabled = !layout_test_mode_ ||
- inspector_test_mode_;
+ developer_extras_enabled_;
web_prefs_->site_specific_quirks_enabled = true;
web_prefs_->shrinks_standalone_images_to_fit = false;
web_prefs_->uses_universal_detector = false;
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index dd0dc2e..12227a0 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -370,8 +370,13 @@ private:
static HINSTANCE instance_handle_;
#endif
- // True when the app is being run using the --layout-tests switch.
+ // True if developer extras should be enabled.
+ static bool developer_extras_enabled_;
+
+ // Whether DevTools should be open before loading the page.
static bool inspector_test_mode_;
+
+ // True when the app is being run using the --layout-tests switch.
static bool layout_test_mode_;
// Default timeout in ms for file page loads when in layout test mode.
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 8d7f8ec7..934eef4 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -258,6 +258,10 @@ bool TestShell::RunFileTest(const TestParams& params) {
strstr(params.test_url.c_str(), "\\inspector\\"))
inspector_test_mode_ = true;
+ developer_extras_enabled_ = inspector_test_mode_ ||
+ strstr(params.test_url.c_str(), "/inspector-enabled/") ||
+ strstr(params.test_url.c_str(), "\\inspector-enabled\\");
+
// Clean up state between test runs.
webkit_glue::ResetBeforeTestRun(shell->webView());
ResetWebPreferences();