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

Unified Diff: content/shell/webkit_test_runner_bindings.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.js ('k') | content/shell/webkit_test_runner_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/webkit_test_runner_bindings.cc
diff --git a/content/shell/webkit_test_runner_bindings.cc b/content/shell/webkit_test_runner_bindings.cc
index 4e4f597b945fe92be973e77a0689967b329ef39f..3e1878f9d0cd5376130775ff5e3186ce16470e40 100644
--- a/content/shell/webkit_test_runner_bindings.cc
+++ b/content/shell/webkit_test_runner_bindings.cc
@@ -62,6 +62,15 @@ v8::Handle<v8::Value> NotifyDone(const v8::Arguments& args) {
return v8::Undefined();
}
+v8::Handle<v8::Value> SetCanOpenWindows(const v8::Arguments& args) {
+ RenderView* view = GetCurrentRenderView();
+ if (!view)
+ return v8::Undefined();
+
+ view->Send(new ShellViewHostMsg_CanOpenWindows(view->GetRoutingID()));
+ return v8::Undefined();
+}
+
v8::Handle<v8::Value> SetDumpAsText(const v8::Arguments& args) {
RenderView* view = GetCurrentRenderView();
if (!view)
@@ -173,6 +182,8 @@ WebKitTestRunnerBindings::GetNativeFunction(v8::Handle<v8::String> name) {
return v8::FunctionTemplate::New(Display);
if (name->Equals(v8::String::New("NotifyDone")))
return v8::FunctionTemplate::New(NotifyDone);
+ if (name->Equals(v8::String::New("SetCanOpenWindows")))
+ return v8::FunctionTemplate::New(SetCanOpenWindows);
if (name->Equals(v8::String::New("SetDumpAsText")))
return v8::FunctionTemplate::New(SetDumpAsText);
if (name->Equals(v8::String::New("SetDumpChildFramesAsText")))
« no previous file with comments | « content/shell/webkit_test_runner.js ('k') | content/shell/webkit_test_runner_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698