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

Unified Diff: remoting/webapp/js_proto/qunit_proto.js

Issue 959963002: [Chromoting] Enable jscompile for webapp unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename sinon.$testStub -> sinon.TestStub Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
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..dd5745f90e67c25555a27171bc8a1875ed8de0d0
--- /dev/null
+++ b/remoting/webapp/js_proto/qunit_proto.js
@@ -0,0 +1,87 @@
+// 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() {};
+
+/** @type {QUnit.Clock} */
+QUnit.Test.prototype.clock = new QUnit.Clock();
+
+/** @constructor */
+QUnit.Clock = function() {};
+
+/** @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;

Powered by Google App Engine
This is Rietveld 408576698