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

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

Issue 503063004: Hangouts Remote Desktop Part VI - Show confirm dialog before retrieving access code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: remoting/webapp/unittests/it2me_helpee_channel_unittest.js
diff --git a/remoting/webapp/unittests/it2me_helpee_channel_unittest.js b/remoting/webapp/unittests/it2me_helpee_channel_unittest.js
index 46619c3d2cf0731bb6f110926b0e937fb625777f..366fbeaf5db1596f444682c01f0ff9c85a4adcdc 100644
--- a/remoting/webapp/unittests/it2me_helpee_channel_unittest.js
+++ b/remoting/webapp/unittests/it2me_helpee_channel_unittest.js
@@ -82,7 +82,7 @@ QUnit.asyncTest(
QUnit.asyncTest('isHostInstalled() should return true if host is installed',
function() {
- sinon.stub(hostInstaller, "isInstalled").returns(Promise.resolve(true));
+ sinon.stub(hostInstaller, 'isInstalled').returns(Promise.resolve(true));
kelvinp 2014/08/25 23:49:34 The replacement of double quotes to single quotes
var MessageTypes = remoting.It2MeHelpeeChannel.HangoutMessageTypes;
hangoutPort.onMessage.mock$fire({
@@ -100,7 +100,7 @@ QUnit.asyncTest('isHostInstalled() should return true if host is installed',
test('downloadHost() should trigger a host download',
function() {
- sinon.stub(hostInstaller, "download").returns(Promise.resolve(true));
+ sinon.stub(hostInstaller, 'download').returns(Promise.resolve(true));
hangoutPort.onMessage.mock$fire({
method: remoting.It2MeHelpeeChannel.HangoutMessageTypes.DOWNLOAD_HOST
@@ -125,14 +125,16 @@ test('connect() should return error if email is missing',
QUnit.asyncTest('connect() should return access code',
function() {
// Stubs authentication.
- sinon.stub(base, "isAppsV2").returns(true);
- sinon.stub(chrome.identity, "getAuthToken")
+ sinon.stub(base, 'isAppsV2').returns(true);
+ sinon.stub(remoting.MessageWindow, 'showConfirmWindow')
+ .callsArgWith(4, 1 /* 1 for OK. */);
+ sinon.stub(chrome.identity, 'getAuthToken')
.callsArgWith(1, 'token');
// Stubs Host behavior.
- sinon.stub(host, "initialized").returns(true);
- sinon.stub(host, "connect")
+ sinon.stub(host, 'initialized').returns(true);
+ sinon.stub(host, 'connect')
.callsArgWith(2, remoting.HostSession.State.RECEIVED_ACCESS_CODE);
- sinon.stub(host, "getAccessCode").returns('accessCode');
+ sinon.stub(host, 'getAccessCode').returns('accessCode');
var MessageTypes = remoting.It2MeHelpeeChannel.HangoutMessageTypes;
hangoutPort.onMessage.mock$fire({
@@ -154,7 +156,7 @@ QUnit.asyncTest('connect() should return access code',
});
test('should disconnect the session if Hangout crashes', function() {
- sinon.spy(host, "disconnect");
+ sinon.spy(host, 'disconnect');
hangoutPort.onDisconnect.mock$fire();
sinon.assert.called(onDisposedCallback);
« remoting/resources/remoting_strings.grd ('K') | « remoting/webapp/unittests/base_unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698