| 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');
|
| + QUnit.ok(message.supportedFeatures instanceof Array);
|
| +});
|
| +
|
| 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
|
| + });
|
| +
|
| sinon.assert.called(hangoutPort.disconnect);
|
| sinon.assert.calledOnce(disconnectCallback);
|
| });
|
|
|