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

Unified Diff: content/shell/webkit_test_runner_host.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/webkit_test_runner_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_runner_host.cc
diff --git a/content/shell/webkit_test_runner_host.cc b/content/shell/webkit_test_runner_host.cc
index 5eef32d785f7a63b2f0b5978633f4abde0a93ae7..6935f6964452c567ce3580984e57683aeb518feb 100644
--- a/content/shell/webkit_test_runner_host.cc
+++ b/content/shell/webkit_test_runner_host.cc
@@ -181,6 +181,7 @@ bool WebKitTestController::ResetAfterLayoutTest() {
should_stay_on_page_after_handling_before_unload_ = false;
wait_until_done_ = false;
prefs_ = ShellWebPreferences();
+ can_open_windows_ = false;
watchdog_.Cancel();
if (main_window_) {
Observe(NULL);
@@ -380,6 +381,7 @@ bool WebKitTestRunnerHost::OnMessageReceived(
OnSetShouldStayOnPageAfterHandlingBeforeUnload)
IPC_MESSAGE_HANDLER(ShellViewHostMsg_WaitUntilDone, OnWaitUntilDone)
IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotImplemented, OnNotImplemented)
+ IPC_MESSAGE_HANDLER(ShellViewHostMsg_CanOpenWindows, OnCanOpenWindows)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -419,4 +421,8 @@ void WebKitTestRunnerHost::OnNotImplemented(
WebKitTestController::Get()->NotImplemented(object_name, property_name);
}
+void WebKitTestRunnerHost::OnCanOpenWindows() {
+ WebKitTestController::Get()->set_can_open_windows(true);
+}
+
} // namespace content
« no previous file with comments | « content/shell/webkit_test_runner_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698