Chromium Code Reviews| Index: remoting/webapp/unittests/it2me_helper_channel_unittest.js |
| diff --git a/remoting/webapp/unittests/it2me_helper_channel_unittest.js b/remoting/webapp/unittests/it2me_helper_channel_unittest.js |
| index b5511c33058c9c9a0ef7d3ceb1aea7589e0561d1..b2f76c25cbb2115e93578fd715400b84ed840aaf 100644 |
| --- a/remoting/webapp/unittests/it2me_helper_channel_unittest.js |
| +++ b/remoting/webapp/unittests/it2me_helper_channel_unittest.js |
| @@ -61,6 +61,17 @@ function promiseResolveSynchronous(value) { |
| }; |
| } |
| +test('onHangoutMessage_("hello") should return supportedFeatures', function() { |
| + hangoutPort.onMessage.mock$fire( |
| + { method: remoting.It2MeHelperChannel.HangoutMessageTypes.HELLO }); |
| + |
| + var spyCall = hangoutPort.postMessage.firstCall; |
| + var message = spyCall.args[0]; |
| + |
| + QUnit.equal(message.method, 'helloResponse'); |
|
Jamie
2014/08/15 21:57:31
remoting.It2MeHelperChannel.HangoutMessageTypes.HE
kelvinp
2014/08/15 23:25:01
Done.
|
| + QUnit.ok(message.supportedFeatures instanceof Array); |
|
Jamie
2014/08/15 21:57:31
I think it might be worth checking that it's equal
kelvinp
2014/08/15 23:25:01
Done.
|
| +}); |
| + |
| test('onHangoutMessage_(|connect|) should launch the webapp', |
| function() { |
| sinon.assert.called(appLauncher.launch); |
| @@ -120,6 +131,12 @@ test('should notify hangout when the session is ended', function() { |
| method:'sessionStateChanged', |
| state:remoting.ClientSession.State.CLOSED |
| }); |
| + |
| + sinon.assert.neverCalledWith(hangoutPort.postMessage, { |
| + method:'sessionStateChanged', |
| + state:remoting.ClientSession.State.FAILED |
| + }); |
|
Jamie
2014/08/15 21:57:32
Is this related to this CL?
kelvinp
2014/08/15 23:25:01
Done.
|
| + |
| sinon.assert.called(hangoutPort.disconnect); |
| sinon.assert.calledOnce(disconnectCallback); |
| }); |