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

Unified Diff: remoting/webapp/unittests/sinon_helpers.js

Issue 959963002: [Chromoting] Enable jscompile for webapp unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/unittests/sinon_helpers.js
diff --git a/remoting/webapp/unittests/sinon_helpers.js b/remoting/webapp/unittests/sinon_helpers.js
new file mode 100644
index 0000000000000000000000000000000000000000..3fdc27be643477d037f86bbf6a352fb0143057b2
--- /dev/null
+++ b/remoting/webapp/unittests/sinon_helpers.js
@@ -0,0 +1,24 @@
+// Copyright 2014 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 mock objects for the chrome platform to make
kelvinp 2015/02/26 00:31:30 update comments
garykac 2015/02/28 02:33:33 Done.
+// unit testing easier.
+
+var sinonHelpers = {};
+
+sinonHelpers.reset = function() {
+
+/**
+ * @param {Object} obj
+ * @param {string} method
+ * @return {sinon.$testStub}
+ * @suppress {reportUnknownTypes}
+ */
+sinon.$setupStub = function(obj, method) {
+ sinon.stub(obj, method);
+ obj[method].$testStub = /** @type {sinon.$testStub} */ (obj[method]);
+ return obj[method].$testStub;
+};
+
+};

Powered by Google App Engine
This is Rietveld 408576698