PermissionRequestCreatorApiary: switch from deprecated "namespace" to "eventType"
[chromium-blink-merge.git] / remoting / webapp / js_proto / qunit_proto.js
blobff289caae949b25a7869f14e8bc3438d93d73ebd
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
3 // found in the LICENSE file.
5 // This file contains various hacks needed to inform JSCompiler of various
6 // QUnit-specific properties and methods. It is used only with JSCompiler to
7 // verify the type-correctness of our code.
10 /** @type {Object} */
11 var QUnit = QUnit || {};
13 /** @constructor */
14 QUnit.Test = function() {};
16 /** @type {QUnit.Clock} */
17 QUnit.Test.prototype.clock = new QUnit.Clock();
19 /** @constructor */
20 QUnit.Clock = function() {};
22 /** @param {number} ticks */
23 QUnit.Clock.prototype.tick = function(ticks) {};
25 /** @param {Function} f */
26 QUnit.testStart = function(f) {};
28 /**
29 * @interface
31 QUnit.Assert = function() {};
33 /**
34 * @return {function():void}
36 QUnit.Assert.prototype.async = function() {};
38 /**
39 * @param {*} a
40 * @param {*} b
41 * @param {string=} opt_desc
43 QUnit.Assert.prototype.notEqual = function(a, b, opt_desc) {};
45 /**
46 * @param {*} cond Passes if cond is truthy.
47 * @param {string=} desc
48 * @return {boolean}
50 QUnit.Assert.prototype.ok = function(cond, desc) {};
52 /**
53 * @param {*} a
54 * @param {*} b
55 * @param {string=} opt_message
57 QUnit.Assert.prototype.deepEqual = function(a, b, opt_message) {};
59 /**
60 * @param {*} a
61 * @param {*} b
62 * @param {string=} opt_message
64 QUnit.Assert.prototype.equal = function(a, b, opt_message) {};
66 /**
67 * @param {number} assertionCount
69 QUnit.Assert.prototype.expect = function(assertionCount) {};
71 /**
72 * @param {*} a
73 * @param {*} b
74 * @param {string=} opt_message
76 QUnit.Assert.prototype.strictEqual = function(a, b, opt_message) {};
78 /**
79 * @param {function()} a
80 * @param {*=} opt_b
81 * @param {string=} opt_message
83 QUnit.Assert.prototype.throws = function(a, opt_b, opt_message) {};
85 /**
86 * @typedef {{
87 * beforeEach: (function(!QUnit.Assert) | undefined),
88 * afterEach: (function(!QUnit.Assert) | undefined)
89 * }}
91 QUnit.ModuleArgs;
93 /**
94 * @param {string} desc
95 * @param {QUnit.ModuleArgs=} opt_args=
97 QUnit.module = function(desc, opt_args) {};
99 /**
100 * @param {string} desc
101 * @param {function(!QUnit.Assert)} f
103 QUnit.test = function(desc, f) {};