From 45fbad0fdf0c83236a997e043805cfade80fc5d8 Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Fri, 23 Apr 2010 01:47:16 +0000 Subject: 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 --- webkit/tools/test_shell/test_shell_mac.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'webkit/tools/test_shell/test_shell_mac.mm') diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index 923b5b0..618f91d 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -195,13 +195,15 @@ void TestShell::PlatformShutdown() { } // static -void TestShell::InitializeTestShell(bool layout_test_mode) { +void TestShell::InitializeTestShell(bool layout_test_mode, + bool allow_external_pages) { // This should move to a per-process platform-specific initialization function // when one exists. window_list_ = new WindowList; layout_test_mode_ = layout_test_mode; - + allow_external_pages_ = allow_external_pages; + web_prefs_ = new WebPreferences; // mmap the data pack which holds strings used by WebCore. This is only -- cgit v1.1