Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1952)

Unified Diff: content/shell/shell_content_browser_client.cc

Issue 11411282: [content shell] add support for testRunner.canOpenWindows and disallow opening windows per default … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_content_browser_client.cc
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index 401919947714ad1345ab374b2340c95d35995364..e806f3667591b3ebca3fcb2edd850d06e13dd653 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,
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698