summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 10:18:07 +0000
committeryurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 10:18:07 +0000
commitf764d01e2084cb8db42f8e9103ffe98e2ea3a0a7 (patch)
treebc65452a580e87e3ad7a2b7bd8f50f0fa3fea8be /webkit
parent75da04f8332f97e3cb4b770142689811e99951c8 (diff)
downloadchromium_src-f764d01e2084cb8db42f8e9103ffe98e2ea3a0a7.zip
chromium_src-f764d01e2084cb8db42f8e9103ffe98e2ea3a0a7.tar.gz
chromium_src-f764d01e2084cb8db42f8e9103ffe98e2ea3a0a7.tar.bz2
Allow running tests with enabled but closed Web Inspector. Corresponding WebKit change: https://bugs.webkit.org/show_bug.cgi?id=36610
Review URL: http://codereview.chromium.org/1359001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42745 0039d316-1c4b-4281-b951-d872f2087c98
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();