diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-30 14:42:55 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-30 14:42:55 +0000 |
commit | 2244953ad06709674663e182abf61f17d94698b1 (patch) | |
tree | bd8d2f1bc8c2645a1df43b12958d3484e3e832f6 /content/shell/shell_content_browser_client.cc | |
parent | 18d2fd4eaf00e7f09bcce4c2b96c07e624e736ee (diff) | |
download | chromium_src-2244953ad06709674663e182abf61f17d94698b1.zip chromium_src-2244953ad06709674663e182abf61f17d94698b1.tar.gz chromium_src-2244953ad06709674663e182abf61f17d94698b1.tar.bz2 |
[content shell] add support for testRunner.canOpenWindows and disallow opening windows per default for layout tests
BUG=111316
R=marja@chromium.org
Review URL: https://codereview.chromium.org/11411282
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_content_browser_client.cc')
-rw-r--r-- | content/shell/shell_content_browser_client.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc index 4019199..e806f36 100644 --- a/content/shell/shell_content_browser_client.cc +++ b/content/shell/shell_content_browser_client.cc @@ -121,6 +121,19 @@ WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( return NULL; } +bool ShellContentBrowserClient::CanCreateWindow( + const GURL& opener_url, + const GURL& origin, + WindowContainerType container_type, + ResourceContext* context, + int render_process_id, + bool* no_javascript_access) { + *no_javascript_access = false; + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) + return true; + return WebKitTestController::Get()->can_open_windows(); +} + #if defined(OS_ANDROID) void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const CommandLine& command_line, |