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

Side by Side Diff: content/shell/webkit_test_runner.js

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 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_messages.h ('k') | content/shell/webkit_test_runner_bindings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var testRunner = testRunner || {}; 5 var testRunner = testRunner || {};
6 6
7 (function() { 7 (function() {
8 native function Display(); 8 native function Display();
9 native function GetWorkerThreadCount(); 9 native function GetWorkerThreadCount();
10 native function NotifyDone(); 10 native function NotifyDone();
11 native function SetCanOpenWindows();
11 native function SetDumpAsText(); 12 native function SetDumpAsText();
12 native function SetDumpChildFramesAsText(); 13 native function SetDumpChildFramesAsText();
13 native function SetPrinting(); 14 native function SetPrinting();
14 native function SetShouldStayOnPageAfterHandlingBeforeUnload(); 15 native function SetShouldStayOnPageAfterHandlingBeforeUnload();
15 native function SetWaitUntilDone(); 16 native function SetWaitUntilDone();
16 native function SetXSSAuditorEnabled(); 17 native function SetXSSAuditorEnabled();
17 18
18 native function NotImplemented(); 19 native function NotImplemented();
19 20
20 var DefaultHandler = function(name) { 21 var DefaultHandler = function(name) {
(...skipping 13 matching lines...) Expand all
34 var TestRunner = function() { 35 var TestRunner = function() {
35 Object.defineProperty(this, "display", {value: Display}); 36 Object.defineProperty(this, "display", {value: Display});
36 Object.defineProperty(this, 37 Object.defineProperty(this,
37 "workerThreadCount", 38 "workerThreadCount",
38 {value: GetWorkerThreadCount}); 39 {value: GetWorkerThreadCount});
39 Object.defineProperty(this, "notifyDone", {value: NotifyDone}); 40 Object.defineProperty(this, "notifyDone", {value: NotifyDone});
40 Object.defineProperty(this, "dumpAsText", {value: SetDumpAsText}); 41 Object.defineProperty(this, "dumpAsText", {value: SetDumpAsText});
41 Object.defineProperty(this, 42 Object.defineProperty(this,
42 "dumpChildFramesAsText", 43 "dumpChildFramesAsText",
43 {value: SetDumpChildFramesAsText}); 44 {value: SetDumpChildFramesAsText});
45 Object.defineProperty(this,
46 "setCanOpenWindows",
47 {value: SetCanOpenWindows});
44 Object.defineProperty(this, "setPrinting", {value: SetPrinting}); 48 Object.defineProperty(this, "setPrinting", {value: SetPrinting});
45 Object.defineProperty( 49 Object.defineProperty(
46 this, 50 this,
47 "setShouldStayOnPageAfterHandlingBeforeUnload", 51 "setShouldStayOnPageAfterHandlingBeforeUnload",
48 {value: SetShouldStayOnPageAfterHandlingBeforeUnload}); 52 {value: SetShouldStayOnPageAfterHandlingBeforeUnload});
49 Object.defineProperty(this, 53 Object.defineProperty(this,
50 "setXSSAuditorEnabled", 54 "setXSSAuditorEnabled",
51 {value: SetXSSAuditorEnabled}); 55 {value: SetXSSAuditorEnabled});
52 Object.defineProperty(this, "waitUntilDone", {value: SetWaitUntilDone}); 56 Object.defineProperty(this, "waitUntilDone", {value: SetWaitUntilDone});
53 57
(...skipping 24 matching lines...) Expand all
78 "addDisallowedURL", 82 "addDisallowedURL",
79 "applicationCacheDiskUsageForOrigin" 83 "applicationCacheDiskUsageForOrigin"
80 ]; 84 ];
81 for (var stub in stubs) { 85 for (var stub in stubs) {
82 Object.defineProperty(this, stub, {value: function() { return null; }}); 86 Object.defineProperty(this, stub, {value: function() { return null; }});
83 } 87 }
84 } 88 }
85 TestRunner.prototype = DefaultHandler("testRunner"); 89 TestRunner.prototype = DefaultHandler("testRunner");
86 testRunner = new TestRunner(); 90 testRunner = new TestRunner();
87 })(); 91 })();
OLDNEW
« no previous file with comments | « content/shell/shell_messages.h ('k') | content/shell/webkit_test_runner_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698