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.
11 var QUnit
= QUnit
|| {};
14 QUnit
.Test = function() {};
16 /** @type {QUnit.Clock} */
17 QUnit
.Test
.prototype.clock
= new QUnit
.Clock();
20 QUnit
.Clock = function() {};
22 /** @param {number} ticks */
23 QUnit
.Clock
.prototype.tick = function(ticks
) {};
27 * @param {string} desc
30 QUnit
.asyncTest = function(desc
, f
) {};
36 QUnit
.deepEqual = function(a
, b
) {};
42 QUnit
.equal = function(a
, b
) {};
47 QUnit
.expect = function(a
) {};
50 * @param {string} desc
51 * @param {Object=} dict
53 QUnit
.module = function(desc
, dict
) {};
58 * @param {string} desc
60 QUnit
.notEqual = function(a
, b
, desc
) {};
63 * @param {boolean} cond
64 * @param {string=} desc
67 QUnit
.ok = function(cond
, desc
) {};
69 QUnit
.start = function() {};
72 * @param {string} desc
75 QUnit
.test = function(desc
, f
) {};
77 /** @param {Function} f */
78 QUnit
.testStart = function(f
) {};
81 var deepEqual
= QUnit
.deepEqual
;
82 var equal
= QUnit
.equal
;
83 var expect
= QUnit
.expect
;
84 var module
= QUnit
.module
;
85 var notEqual
= QUnit
.notEqual
;
87 var test
= QUnit
.test
;