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

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

Issue 1004513002: Eliminated named constants for instances of remoting.Error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/xmpp_login_handler.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/xmpp_login_handler_unittest.js
diff --git a/remoting/webapp/crd/js/xmpp_login_handler_unittest.js b/remoting/webapp/crd/js/xmpp_login_handler_unittest.js
index 14216512bdd615358e548ce21841e1e308edad93..dfd1a61a3eb18536736f6582779288d96d0c1282 100644
--- a/remoting/webapp/crd/js/xmpp_login_handler_unittest.js
+++ b/remoting/webapp/crd/js/xmpp_login_handler_unittest.js
@@ -162,7 +162,8 @@ test('should return AUTHENTICATION_FAILED error when failed to authenticate',
loginHandler.onDataReceived(
base.encodeUtf8('<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">' +
'<not-authorized/></failure>'));
- sinon.assert.calledWith(onError, remoting.Error.AUTHENTICATION_FAILED);
+ sinon.assert.calledWith(onError, new remoting.Error(
+ remoting.Error.Tag.AUTHENTICATION_FAILED));
});
test('should return UNEXPECTED error when failed to parse stream',
@@ -170,7 +171,7 @@ test('should return UNEXPECTED error when failed to parse stream',
handshakeBase();
loginHandler.onDataReceived(
base.encodeUtf8('BAD DATA'));
- sinon.assert.calledWith(onError, remoting.Error.UNEXPECTED);
+ sinon.assert.calledWith(onError, remoting.Error.unexpected());
});
})();
« no previous file with comments | « remoting/webapp/crd/js/xmpp_login_handler.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698