From 1de1aa61414b1769e5e3dcda683ed10ab96de06e Mon Sep 17 00:00:00 2001 From: "patrick@chromium.org" Date: Wed, 17 Sep 2008 21:43:30 +0000 Subject: Add a new switch: --allow-scripts-to-close-windows. With this switch, window.close() will always be enabled. Currently the switch is only available in test_shell. Review URL: http://codereview.chromium.org/2915 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2333 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/test_shell/test_shell_main.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'webkit/tools/test_shell/test_shell_main.cc') diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 0383424..8f7ee3b 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -195,6 +195,9 @@ int main(int argc, char* argv[]) bool interactive = !layout_test_mode; TestShell::InitializeTestShell(interactive); + if (parsed_command_line.HasSwitch(test_shell::kAllowScriptsToCloseWindows)) + TestShell::SetAllowScriptsToCloseWindows(); + // Disable user themes for layout tests so pixel tests are consistent. if (!interactive) gfx::NativeTheme::instance()->DisableTheming(); -- cgit v1.1