Chromium Code Reviews| Index: remoting/webapp/js_proto/qunit_proto.js |
| diff --git a/remoting/webapp/js_proto/qunit_proto.js b/remoting/webapp/js_proto/qunit_proto.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f0a57aad44629d1b9c391b422807ebf1493fc544 |
| --- /dev/null |
| +++ b/remoting/webapp/js_proto/qunit_proto.js |
| @@ -0,0 +1,86 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// This file contains various hacks needed to inform JSCompiler of various |
| +// QUnit-specific properties and methods. It is used only with JSCompiler to |
| +// verify the type-correctness of our code. |
| + |
| + |
| +/** @type {Object} */ |
| +var QUnit = QUnit || {}; |
| + |
| +/** @constructor */ |
| +QUnit.$test = function() {}; |
|
kelvinp
2015/02/26 00:31:30
Upper case for Types and drop $
garykac
2015/02/28 02:33:33
Done.
|
| + |
| +/** @type {QUnit.$clock} */ |
| +QUnit.$test.prototype.clock = new QUnit.$clock(); |
| + |
| +/** @constructor */ |
| +QUnit.$clock = function() {}; |
|
kelvinp
2015/02/26 00:31:30
upper case for types and no need to use $ as proto
garykac
2015/02/28 02:33:33
Done.
|
| + |
| +/** @param {number} ticks */ |
| +QUnit.$clock.prototype.tick = function(ticks) {}; |
| + |
| +/** |
| + * @param {string} desc |
| + * @param {Function} f |
| + */ |
| +QUnit.asyncTest = function(desc, f) {}; |
| + |
| +/** |
| + * @param {*} a |
| + * @param {*} b |
| + */ |
| +QUnit.deepEqual = function(a, b) {}; |
| + |
| +/** |
| + * @param {*} a |
| + * @param {*} b |
| + */ |
| +QUnit.equal = function(a, b) {}; |
| + |
| +/** |
| + * @param {*} a |
| + */ |
| +QUnit.expect = function(a) {}; |
| + |
| +/** |
| + * @param {string} desc |
| + * @param {Object=} dict |
| + */ |
| +QUnit.module = function(desc, dict) {}; |
| + |
| +/** |
| + * @param {*} a |
| + * @param {*} b |
| + * @param {string} desc |
| + */ |
| +QUnit.notEqual = function(a, b, desc) {}; |
| + |
| +/** |
| + * @param {boolean} cond |
| + * @param {string=} desc |
| + * @return {boolean} |
| + */ |
| +QUnit.ok = function(cond, desc) {}; |
| + |
| +QUnit.start = function() {}; |
| + |
| +/** |
| + * @param {string} desc |
| + * @param {Function} f |
| + */ |
| +QUnit.test = function(desc, f) {}; |
| + |
| +/** @param {Function} f */ |
| +QUnit.testStart = function(f) {}; |
| + |
| + |
| +var deepEqual = QUnit.deepEqual; |
| +var equal = QUnit.equal; |
| +var expect = QUnit.expect; |
| +var module = QUnit.module; |
| +var notEqual = QUnit.notEqual; |
| +var ok = QUnit.ok; |
| +var test = QUnit.test; |