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

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

Issue 530213004: Use XMPP in V2 webapp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/signal_strategy.js ('k') | remoting/webapp/wcs_adapter.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/unittests/xmpp_connection_unittest.js
diff --git a/remoting/webapp/unittests/xmpp_connection_unittest.js b/remoting/webapp/unittests/xmpp_connection_unittest.js
index 59feff236d4370b4dbf940e236bf4a59b7b97dc5..4f33fa5728fd9166f134333d13be8ff1edc43f55 100644
--- a/remoting/webapp/unittests/xmpp_connection_unittest.js
+++ b/remoting/webapp/unittests/xmpp_connection_unittest.js
@@ -29,7 +29,8 @@ module('XmppConnection', {
sinon.stub(chrome.socket, 'destroy');
sinon.stub(chrome.socket, 'secure');
- connection = new remoting.XmppConnection(onStateChange, onStanza);
+ connection = new remoting.XmppConnection(onStateChange);
+ connection.setIncomingStanzaCallback(onStanza);
},
teardown: function() {
@@ -46,7 +47,7 @@ test('should go to FAILED state when failed to connect', function() {
connection.connect(
'xmpp.example.com:123', 'testUsername@gmail.com', 'testToken');
sinon.assert.calledWith(onStateChange,
- remoting.XmppConnection.State.CONNECTING);
+ remoting.SignalStrategy.State.CONNECTING);
sinon.assert.calledWith(chrome.socket.create, "tcp", {});
chrome.socket.create.getCall(0).args[2]({socketId: socketId});
@@ -62,7 +63,7 @@ test('should use XmppLoginHandler to complete handshake and read data',
connection.connect(
'xmpp.example.com:123', 'testUsername@gmail.com', 'testToken');
sinon.assert.calledWith(onStateChange,
- remoting.XmppConnection.State.CONNECTING);
+ remoting.SignalStrategy.State.CONNECTING);
sinon.assert.calledWith(chrome.socket.create, "tcp", {});
chrome.socket.create.getCall(0).args[2]({socketId: socketId});
@@ -71,7 +72,7 @@ test('should use XmppLoginHandler to complete handshake and read data',
chrome.socket.connect.getCall(0).args[3](0);
sinon.assert.calledWith(onStateChange,
- remoting.XmppConnection.State.HANDSHAKE);
+ remoting.SignalStrategy.State.HANDSHAKE);
var parser = new remoting.XmppStreamParser();
var parserMock = sinon.mock(parser);
@@ -79,7 +80,7 @@ test('should use XmppLoginHandler to complete handshake and read data',
connection.loginHandler_.onHandshakeDoneCallback_('test@example.com/123123',
parser);
sinon.assert.calledWith(onStateChange,
- remoting.XmppConnection.State.CONNECTED);
+ remoting.SignalStrategy.State.CONNECTED);
setCallbacksCalled.verify();
// Simulate read() callback with |data|. It should be passed to the parser.
« no previous file with comments | « remoting/webapp/signal_strategy.js ('k') | remoting/webapp/wcs_adapter.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698