OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // This file contains various hacks needed to inform JSCompiler of various | 5 // This file contains various hacks needed to inform JSCompiler of various |
6 // test-specific properties and methods. It is used only with JSCompiler to | 6 // test-specific properties and methods. It is used only with JSCompiler to |
7 // verify the type-correctness of our code. | 7 // verify the type-correctness of our code. |
8 | 8 |
9 /** @suppress {duplicate} */ | 9 /** @suppress {duplicate} */ |
10 var browserTest = browserTest || {}; | 10 var browserTest = browserTest || {}; |
11 | 11 |
12 /** @suppress {duplicate} */ | |
13 var sinon = sinon || {}; | |
14 | |
15 /** @interface */ | 12 /** @interface */ |
16 browserTest.TestableClass = function() {}; | 13 browserTest.TestableClass = function() {}; |
17 | 14 |
18 /** @param {*} data */ | 15 /** @param {*} data */ |
19 browserTest.TestableClass.prototype.run = function(data) {}; | 16 browserTest.TestableClass.prototype.run = function(data) {}; |
20 | 17 |
21 sinon.spy = function() {}; | |
22 | 18 |
23 /** @constructor */ | 19 /** @constructor */ |
24 window.DomAutomationControllerMessage = function() { | 20 window.DomAutomationControllerMessage = function() { |
25 /** @type {boolean} */ | 21 /** @type {boolean} */ |
26 this.succeeded = false; | 22 this.succeeded = false; |
27 /** @type {string} */ | 23 /** @type {string} */ |
28 this.error_message = ''; | 24 this.error_message = ''; |
29 /** @type {string} */ | 25 /** @type {string} */ |
30 this.stack_trace = ''; | 26 this.stack_trace = ''; |
31 }; | 27 }; |
32 | 28 |
33 /** @constructor */ | 29 /** @constructor */ |
34 window.DomAutomationController = function() {}; | 30 window.DomAutomationController = function() {}; |
35 | 31 |
36 /** @param {string} json A stringified DomAutomationControllerMessage. */ | 32 /** @param {string} json A stringified DomAutomationControllerMessage. */ |
37 window.DomAutomationController.prototype.send = function(json) {}; | 33 window.DomAutomationController.prototype.send = function(json) {}; |
OLD | NEW |