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

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

Issue 959963002: [Chromoting] Enable jscompile for webapp unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix key tester 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
« no previous file with comments | « remoting/webapp/unittests/event_hook_unittest.js ('k') | remoting/webapp/unittests/ipc_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/unittests/fallback_signal_strategy_unittest.js
diff --git a/remoting/webapp/unittests/fallback_signal_strategy_unittest.js b/remoting/webapp/unittests/fallback_signal_strategy_unittest.js
index 959902ba038fb4ca03b3a43943cefc3e2aa21573..9f97a7293599b4943df6458344582585445d7ccd 100644
--- a/remoting/webapp/unittests/fallback_signal_strategy_unittest.js
+++ b/remoting/webapp/unittests/fallback_signal_strategy_unittest.js
@@ -2,15 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+/**
+ * @fileoverview
+ * TODO(garykac): Create interfaces for LogToServer and SignalStrategy.
+ * @suppress {checkTypes|checkVars|reportUnknownTypes|visibility}
+ */
+
(function() {
'use strict';
-
+/** @constructor */
var MockLogToServer = function() {
+ /** @type {(sinon.Spy|Function)} */
this.logSignalStrategyProgress = sinon.spy();
};
+/** @type {function(...)} */
MockLogToServer.prototype.assertProgress = function() {
equal(this.logSignalStrategyProgress.callCount * 2, arguments.length);
for (var i = 0; i < this.logSignalStrategyProgress.callCount; ++i) {
@@ -20,13 +28,29 @@ MockLogToServer.prototype.assertProgress = function() {
}
};
+/** @type {(sinon.Spy|function(remoting.SignalStrategy.State))} */
var onStateChange = null;
+
+/** @type {(sinon.Spy|function(Element):void)} */
var onIncomingStanzaCallback = null;
+
+/** @type {remoting.FallbackSignalStrategy} */
var strategy = null;
+
+/** @type {remoting.SignalStrategy} */
var primary = null;
+
+/** @type {remoting.SignalStrategy} */
var secondary = null;
+
+/** @type {MockLogToServer} */
var logToServer = null;
+/**
+ * @param {remoting.MockSignalStrategy} baseSignalStrategy
+ * @param {remoting.SignalStrategy.State} state
+ * @param {boolean} expectCallback
+ */
function setState(baseSignalStrategy, state, expectCallback) {
onStateChange.reset();
baseSignalStrategy.setStateForTesting(state);
« no previous file with comments | « remoting/webapp/unittests/event_hook_unittest.js ('k') | remoting/webapp/unittests/ipc_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698