diff options
author | patrick@chromium.org <patrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 21:43:30 +0000 |
---|---|---|
committer | patrick@chromium.org <patrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 21:43:30 +0000 |
commit | 1de1aa61414b1769e5e3dcda683ed10ab96de06e (patch) | |
tree | 0fa830aba628387dbc2232042d06bba60909905e /webkit/tools/test_shell/test_shell.cc | |
parent | cbbe217d6eab1301dde860aa6452aaf7b0e76dba (diff) | |
download | chromium_src-1de1aa61414b1769e5e3dcda683ed10ab96de06e.zip chromium_src-1de1aa61414b1769e5e3dcda683ed10ab96de06e.tar.gz chromium_src-1de1aa61414b1769e5e3dcda683ed10ab96de06e.tar.bz2 |
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
Diffstat (limited to 'webkit/tools/test_shell/test_shell.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 04b9ddc..283e730 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -203,6 +203,12 @@ void TestShell::CleanupLogging() { } // static +void TestShell::SetAllowScriptsToCloseWindows() { + if (web_prefs_) + web_prefs_->allow_scripts_to_close_windows = true; +} + +// static void TestShell::InitializeTestShell(bool interactive) { // Start COM stuff. HRESULT res = OleInitialize(NULL); @@ -244,6 +250,7 @@ void TestShell::ResetWebPreferences() { web_prefs_->user_agent = webkit_glue::GetDefaultUserAgent(); web_prefs_->dashboard_compatibility_mode = false; web_prefs_->java_enabled = true; + web_prefs_->allow_scripts_to_close_windows = false; } } |