summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell.h
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 01:47:16 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 01:47:16 +0000
commit45fbad0fdf0c83236a997e043805cfade80fc5d8 (patch)
tree1b6010795fefb1664a3e25d705381c5c2dff2a99 /webkit/tools/test_shell/test_shell.h
parent8dc1411ff5c8dc7e3a1cc2724c77f7ce0193c4ba (diff)
downloadchromium_src-45fbad0fdf0c83236a997e043805cfade80fc5d8.zip
chromium_src-45fbad0fdf0c83236a997e043805cfade80fc5d8.tar.gz
chromium_src-45fbad0fdf0c83236a997e043805cfade80fc5d8.tar.bz2
Add an --allow-external-pages switch to test_shell.
Normally test_shell will not let you load an external URL (like "www.google.com") when running in --layout-tests mode. This is a good thing because it keeps us from writing tests that might have unpredictable results if the external URL changes. However, it would be cool to be able to use the --layout-test infrastructure to capture the rendered/painted page (outside of the actual layout tests run) for QA purposes. This change adds an --allow-external-pages switch to override the check described above. This is kind of a short-term fix. A better fix would be to add a "--headless" flag that loaded and rendered the page and dumped the whole thing, entirely separate from --layout-test mode. I will add that soon. BUG=none TEST=none R=dglazkov Review URL: http://codereview.chromium.org/1748005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell.h')
-rw-r--r--webkit/tools/test_shell/test_shell.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index f07b5a1..38b1715 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -92,10 +92,12 @@ public:
static void CleanupLogging();
// Initialization and clean up of a static member variable.
- static void InitializeTestShell(bool layout_test_mode);
+ static void InitializeTestShell(bool layout_test_mode,
+ bool allow_external_pages);
static void ShutdownTestShell();
static bool layout_test_mode() { return layout_test_mode_; }
+ static bool allow_external_pages() { return allow_external_pages_; }
// Called from the destructor to let each platform do any necessary
// cleanup.
@@ -382,6 +384,11 @@ private:
// True when the app is being run using the --layout-tests switch.
static bool layout_test_mode_;
+
+ // True when we wish to allow test shell to load external pages like
+ // www.google.com even when in --layout-test mode (used for QA to
+ // produce images of the rendered page)
+ static bool allow_external_pages_;
// Default timeout in ms for file page loads when in layout test mode.
static int file_test_timeout_ms_;