Chromium Code Reviews| 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)); |
|
Jamie
2015/03/12 21:40:11
Does this work? Can calledWith match two error ins
John Williams
2015/03/13 00:26:35
The tests pass, so I assume this method is doing a
|
| }); |
| 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()); |
| }); |
| })(); |