Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: remoting/webapp/js_proto/qunit_proto.js

Issue 1017613002: Migrate Remoting Webapp Unittests to use QUnit 2.0 syntax. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // QUnit-specific properties and methods. It is used only with JSCompiler to 6 // QUnit-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 9
10 /** @type {Object} */ 10 /** @type {Object} */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * @param {string=} opt_message 42 * @param {string=} opt_message
43 */ 43 */
44 QUnit.equal = function(a, b, opt_message) {}; 44 QUnit.equal = function(a, b, opt_message) {};
45 45
46 /** 46 /**
47 * @param {*} a 47 * @param {*} a
48 */ 48 */
49 QUnit.expect = function(a) {}; 49 QUnit.expect = function(a) {};
50 50
51 /** 51 /**
52 * @typedef {{
53 * beforeEach: (function(void) | undefined),
54 * afterEach: (function(void) | undefined)
55 * }}
56 */
57 QUnit.ModuleArgs;
58
59 /**
52 * @param {string} desc 60 * @param {string} desc
53 * @param {Object=} dict 61 * @param {QUnit.ModuleArgs=} opt_args=
54 */ 62 */
55 QUnit.module = function(desc, dict) {}; 63 QUnit.module = function(desc, opt_args) {};
56 64
57 /** 65 /**
58 * @param {*} a 66 * @param {*} a
59 * @param {*} b 67 * @param {*} b
60 * @param {string=} opt_desc 68 * @param {string=} opt_desc
61 */ 69 */
62 QUnit.notEqual = function(a, b, opt_desc) {}; 70 QUnit.notEqual = function(a, b, opt_desc) {};
63 71
64 /** 72 /**
65 * @param {boolean} cond 73 * @param {boolean} cond
66 * @param {string=} desc 74 * @param {string=} desc
67 * @return {boolean} 75 * @return {boolean}
68 */ 76 */
69 QUnit.ok = function(cond, desc) {}; 77 QUnit.ok = function(cond, desc) {};
70 78
71 QUnit.start = function() {};
72
73 /** 79 /**
74 * @param {string} desc 80 * @param {string} desc
75 * @param {Function} f 81 * @param {function(QUnit.Assert=)} f
John Williams 2015/03/17 19:22:37 Just {function(QUnit.Assert)}; using {function(QUn
76 */ 82 */
77 QUnit.test = function(desc, f) {}; 83 QUnit.test = function(desc, f) {};
78 84
79 /** @param {Function} f */ 85 /** @param {Function} f */
80 QUnit.testStart = function(f) {}; 86 QUnit.testStart = function(f) {};
81 87
82 /** 88 /**
83 * @interface 89 * @interface
84 */ 90 */
85 QUnit.Assert = function() {}; 91 QUnit.Assert = function() {};
86 92
87 /** 93 /**
88 * @return {function():void} 94 * @return {function():void}
89 */ 95 */
90 QUnit.Assert.prototype.async = function() {}; 96 QUnit.Assert.prototype.async = function() {};
91
92 var deepEqual = QUnit.deepEqual;
93 var equal = QUnit.equal;
94 var expect = QUnit.expect;
95 var module = QUnit.module;
96 var notEqual = QUnit.notEqual;
97 var ok = QUnit.ok;
98 var test = QUnit.test;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698