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

Side by Side Diff: remoting/webapp/crd/js/host_controller_unittest.js

Issue 1217643002: Added HostListApl implementation to connect to legacy directory and GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcd-e2e
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * Unit tests for host_controller.js. 7 * Unit tests for host_controller.js.
8 */ 8 */
9 9
10 (function() { 10 (function() {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 QUnit.module('host_controller', { 80 QUnit.module('host_controller', {
81 beforeEach: function(/** QUnit.Assert */ assert) { 81 beforeEach: function(/** QUnit.Assert */ assert) {
82 chromeMocks.identity.mock$setToken(FAKE_IDENTITY_TOKEN); 82 chromeMocks.identity.mock$setToken(FAKE_IDENTITY_TOKEN);
83 remoting.settings = new remoting.Settings(); 83 remoting.settings = new remoting.Settings();
84 remoting.identity = new remoting.Identity(); 84 remoting.identity = new remoting.Identity();
85 mockHostListApi = new remoting.MockHostListApi; 85 mockHostListApi = new remoting.MockHostListApi;
86 mockHostListApi.authCodeFromRegister = FAKE_AUTH_CODE; 86 mockHostListApi.authCodeFromRegister = FAKE_AUTH_CODE;
87 mockHostListApi.emailFromRegister = ''; 87 mockHostListApi.emailFromRegister = '';
88 mockHostListApi.hostIdFromRegister = FAKE_HOST_ID; 88 mockHostListApi.hostIdFromRegister = FAKE_HOST_ID;
89 mockHostListApi.hostIdFromConfig = FAKE_HOST_ID;
89 remoting.HostListApi.setInstance(mockHostListApi); 90 remoting.HostListApi.setInstance(mockHostListApi);
90 base.debug.assert(remoting.oauth2 === null); 91 base.debug.assert(remoting.oauth2 === null);
91 remoting.oauth2 = new remoting.OAuth2(); 92 remoting.oauth2 = new remoting.OAuth2();
92 base.debug.assert(remoting.hostList === null); 93 base.debug.assert(remoting.hostList === null);
93 remoting.hostList = /** @type {remoting.HostList} */ 94 remoting.hostList = /** @type {remoting.HostList} */
94 (Object.create(remoting.HostList.prototype)); 95 (Object.create(remoting.HostList.prototype));
95 96
96 // When the HostList's unregisterHostById method is called, make 97 // When the HostList's unregisterHostById method is called, make
97 // sure the argument is correct. 98 // sure the argument is correct.
98 unregisterHostByIdSpy = 99 unregisterHostByIdSpy =
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 resolve(null); 608 resolve(null);
608 }); 609 });
609 }); 610 });
610 }); 611 });
611 612
612 // Tests omitted for hasFeature, getPairedClients, deletePairedClient, 613 // Tests omitted for hasFeature, getPairedClients, deletePairedClient,
613 // and clearPairedClients because they simply call through to 614 // and clearPairedClients because they simply call through to
614 // HostDaemonFacade. 615 // HostDaemonFacade.
615 616
616 })(); 617 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698