OLD | NEW |
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(); | |
12 native function SetDumpAsText(); | 11 native function SetDumpAsText(); |
13 native function SetDumpChildFramesAsText(); | 12 native function SetDumpChildFramesAsText(); |
14 native function SetPrinting(); | 13 native function SetPrinting(); |
15 native function SetShouldStayOnPageAfterHandlingBeforeUnload(); | 14 native function SetShouldStayOnPageAfterHandlingBeforeUnload(); |
16 native function SetWaitUntilDone(); | 15 native function SetWaitUntilDone(); |
17 native function SetXSSAuditorEnabled(); | 16 native function SetXSSAuditorEnabled(); |
18 | 17 |
19 native function NotImplemented(); | 18 native function NotImplemented(); |
20 | 19 |
21 var DefaultHandler = function(name) { | 20 var DefaultHandler = function(name) { |
(...skipping 13 matching lines...) Expand all Loading... |
35 var TestRunner = function() { | 34 var TestRunner = function() { |
36 Object.defineProperty(this, "display", {value: Display}); | 35 Object.defineProperty(this, "display", {value: Display}); |
37 Object.defineProperty(this, | 36 Object.defineProperty(this, |
38 "workerThreadCount", | 37 "workerThreadCount", |
39 {value: GetWorkerThreadCount}); | 38 {value: GetWorkerThreadCount}); |
40 Object.defineProperty(this, "notifyDone", {value: NotifyDone}); | 39 Object.defineProperty(this, "notifyDone", {value: NotifyDone}); |
41 Object.defineProperty(this, "dumpAsText", {value: SetDumpAsText}); | 40 Object.defineProperty(this, "dumpAsText", {value: SetDumpAsText}); |
42 Object.defineProperty(this, | 41 Object.defineProperty(this, |
43 "dumpChildFramesAsText", | 42 "dumpChildFramesAsText", |
44 {value: SetDumpChildFramesAsText}); | 43 {value: SetDumpChildFramesAsText}); |
45 Object.defineProperty(this, | |
46 "setCanOpenWindows", | |
47 {value: SetCanOpenWindows}); | |
48 Object.defineProperty(this, "setPrinting", {value: SetPrinting}); | 44 Object.defineProperty(this, "setPrinting", {value: SetPrinting}); |
49 Object.defineProperty( | 45 Object.defineProperty( |
50 this, | 46 this, |
51 "setShouldStayOnPageAfterHandlingBeforeUnload", | 47 "setShouldStayOnPageAfterHandlingBeforeUnload", |
52 {value: SetShouldStayOnPageAfterHandlingBeforeUnload}); | 48 {value: SetShouldStayOnPageAfterHandlingBeforeUnload}); |
53 Object.defineProperty(this, | 49 Object.defineProperty(this, |
54 "setXSSAuditorEnabled", | 50 "setXSSAuditorEnabled", |
55 {value: SetXSSAuditorEnabled}); | 51 {value: SetXSSAuditorEnabled}); |
56 Object.defineProperty(this, "waitUntilDone", {value: SetWaitUntilDone}); | 52 Object.defineProperty(this, "waitUntilDone", {value: SetWaitUntilDone}); |
57 | 53 |
(...skipping 24 matching lines...) Expand all Loading... |
82 "addDisallowedURL", | 78 "addDisallowedURL", |
83 "applicationCacheDiskUsageForOrigin" | 79 "applicationCacheDiskUsageForOrigin" |
84 ]; | 80 ]; |
85 for (var stub in stubs) { | 81 for (var stub in stubs) { |
86 Object.defineProperty(this, stub, {value: function() { return null; }}); | 82 Object.defineProperty(this, stub, {value: function() { return null; }}); |
87 } | 83 } |
88 } | 84 } |
89 TestRunner.prototype = DefaultHandler("testRunner"); | 85 TestRunner.prototype = DefaultHandler("testRunner"); |
90 testRunner = new TestRunner(); | 86 testRunner = new TestRunner(); |
91 })(); | 87 })(); |
OLD | NEW |