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

Side by Side Diff: remoting/webapp/unittests/it2me_helpee_channel_unittest.js

Issue 979483002: [Chromoting] Remove hangout consent dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « remoting/webapp/crd/js/it2me_helpee_channel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * @suppress {checkTypes|checkVars|reportUnknownTypes|visibility} 7 * @suppress {checkTypes|checkVars|reportUnknownTypes|visibility}
8 */ 8 */
9 9
10 (function() { 10 (function() {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 method: remoting.It2MeHelpeeChannel.HangoutMessageTypes.DOWNLOAD_HOST 119 method: remoting.It2MeHelpeeChannel.HangoutMessageTypes.DOWNLOAD_HOST
120 }); 120 });
121 121
122 sinon.assert.called(hostInstaller.download); 122 sinon.assert.called(hostInstaller.download);
123 }); 123 });
124 124
125 QUnit.asyncTest('connect() should return access code', 125 QUnit.asyncTest('connect() should return access code',
126 function() { 126 function() {
127 // Stubs authentication. 127 // Stubs authentication.
128 sinon.stub(base, 'isAppsV2').returns(true); 128 sinon.stub(base, 'isAppsV2').returns(true);
129 sinon.stub(remoting.HangoutConsentDialog, 'getInstance').returns({
130 show : function() {
131 return Promise.resolve();
132 }
133 });
134 sinon.stub(chrome.identity, 'getAuthToken') 129 sinon.stub(chrome.identity, 'getAuthToken')
135 .callsArgWith(1, 'token'); 130 .callsArgWith(1, 'token');
136 sinon.stub(remoting.identity, 'getToken') 131 sinon.stub(remoting.identity, 'getToken')
137 .returns(Promise.resolve('token')); 132 .returns(Promise.resolve('token'));
138 sinon.stub(remoting.identity, 'getEmail') 133 sinon.stub(remoting.identity, 'getEmail')
139 .returns(Promise.resolve('test@chromium.org')); 134 .returns(Promise.resolve('test@chromium.org'));
140 // Stubs Host behavior. 135 // Stubs Host behavior.
141 sinon.stub(host, 'initialized').returns(true); 136 sinon.stub(host, 'initialized').returns(true);
142 sinon.stub(host, 'connect') 137 sinon.stub(host, 'connect')
143 .callsArgWith(2, remoting.HostSession.State.RECEIVED_ACCESS_CODE); 138 .callsArgWith(2, remoting.HostSession.State.RECEIVED_ACCESS_CODE);
(...skipping 20 matching lines...) Expand all
164 159
165 test('should disconnect the session if Hangout crashes', function() { 160 test('should disconnect the session if Hangout crashes', function() {
166 sinon.spy(host, 'disconnect'); 161 sinon.spy(host, 'disconnect');
167 hangoutPort.onDisconnect.mock$fire(); 162 hangoutPort.onDisconnect.mock$fire();
168 163
169 sinon.assert.called(onDisposedCallback); 164 sinon.assert.called(onDisposedCallback);
170 sinon.assert.called(host.disconnect); 165 sinon.assert.called(host.disconnect);
171 }); 166 });
172 167
173 })(); 168 })();
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/it2me_helpee_channel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698