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

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

Issue 1064683006: Fixed host_controller_unittest.js with code coverage enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 /** @type {sinon.Spy} */ 68 /** @type {sinon.Spy} */
69 var unregisterHostByIdSpy; 69 var unregisterHostByIdSpy;
70 70
71 /** @type {sinon.Spy} */ 71 /** @type {sinon.Spy} */
72 var onLocalHostStartedSpy; 72 var onLocalHostStartedSpy;
73 73
74 QUnit.module('host_controller', { 74 QUnit.module('host_controller', {
75 beforeEach: function(/** QUnit.Assert */ assert) { 75 beforeEach: function(/** QUnit.Assert */ assert) {
76 chromeMocks.activate(['identity', 'runtime']); 76 chromeMocks.activate(['identity', 'runtime']);
77 chromeMocks.identity.mock$setToken(FAKE_IDENTITY_TOKEN); 77 chromeMocks.identity.mock$setToken(FAKE_IDENTITY_TOKEN);
78 remoting.settings = new remoting.Settings();
78 remoting.identity = new remoting.Identity(); 79 remoting.identity = new remoting.Identity();
79 remoting.MockXhr.activate(); 80 remoting.MockXhr.activate();
80 base.debug.assert(remoting.oauth2 === null); 81 base.debug.assert(remoting.oauth2 === null);
81 remoting.oauth2 = new remoting.OAuth2(); 82 remoting.oauth2 = new remoting.OAuth2();
82 base.debug.assert(remoting.hostList === null); 83 base.debug.assert(remoting.hostList === null);
83 remoting.hostList = /** @type {remoting.HostList} */ 84 remoting.hostList = /** @type {remoting.HostList} */
84 (Object.create(remoting.HostList.prototype)); 85 (Object.create(remoting.HostList.prototype));
85 86
86 // When the HostList's unregisterHostById method is called, make 87 // When the HostList's unregisterHostById method is called, make
87 // sure the argument is correct. 88 // sure the argument is correct.
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 resolve(null); 668 resolve(null);
668 }); 669 });
669 }); 670 });
670 }); 671 });
671 672
672 // Tests omitted for hasFeature, getPairedClients, deletePairedClient, 673 // Tests omitted for hasFeature, getPairedClients, deletePairedClient,
673 // and clearPairedClients because they simply call through to 674 // and clearPairedClients because they simply call through to
674 // HostDaemonFacade. 675 // HostDaemonFacade.
675 676
676 })(); 677 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698