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

Unified Diff: remoting/webapp/crd/js/client_session_unittest.js

Issue 1101613003: [Webapp Refactor] Reliably cancels a connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ImproveUnittest
Patch Set: Created 5 years, 8 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/crd/js/client_session_unittest.js
diff --git a/remoting/webapp/crd/js/client_session_unittest.js b/remoting/webapp/crd/js/client_session_unittest.js
index b0877e3345781ffe8fd5ef053b94aab9a4b494bf..74baf55f0319d077f5a96279d93bd6a4a3e11db7 100644
--- a/remoting/webapp/crd/js/client_session_unittest.js
+++ b/remoting/webapp/crd/js/client_session_unittest.js
@@ -21,8 +21,7 @@ var logToServerStub;
var SessionListener = function() {};
SessionListener.prototype.onConnectionFailed = function(error) {};
SessionListener.prototype.onConnected = function(connectionInfo) {};
-SessionListener.prototype.onDisconnected = function() {};
-SessionListener.prototype.onError = function(error) {};
+SessionListener.prototype.onDisconnected = function(error) {};
/** @return {Promise} */
function connect() {
@@ -128,9 +127,9 @@ QUnit.test(
'Connection error after CONNECTED should raise the CONNECTION_DROPPED event',
function(assert) {
return connect().then(function() {
- var onError = sinon.stub(listener, 'onError');
+ var onDisconnected = sinon.stub(listener, 'onDisconnected');
session.disconnect(new remoting.Error(remoting.Error.Tag.P2P_FAILURE));
- assert.equal(onError.callCount, 1);
+ assert.equal(onDisconnected.callCount, 1);
assert.equal(logToServerStub.args[2][0],
remoting.ClientSession.State.CONNECTION_DROPPED);
});

Powered by Google App Engine
This is Rietveld 408576698