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

Unified Diff: remoting/webapp/crd/js/host_controller_unittest.js

Issue 1111603002: Added ability to register new hosts using GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-list-delete
Patch Set: for review 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/crd/js/host_controller_unittest.js
diff --git a/remoting/webapp/crd/js/host_controller_unittest.js b/remoting/webapp/crd/js/host_controller_unittest.js
index d586130aeeec9d2d0a500a9660d770b8c436af45..419254dd8619f95e41e4da2a54a2fb1023d46685 100644
--- a/remoting/webapp/crd/js/host_controller_unittest.js
+++ b/remoting/webapp/crd/js/host_controller_unittest.js
@@ -81,7 +81,8 @@ QUnit.module('host_controller', {
remoting.settings = new remoting.Settings();
remoting.identity = new remoting.Identity();
mockHostListApi = new remoting.MockHostListApi;
- mockHostListApi.registerResult = FAKE_AUTH_CODE;
+ mockHostListApi.authCodeFromRegister = FAKE_AUTH_CODE;
+ mockHostListApi.emailFromRegister = '';
remoting.HostListApi.setInstance(mockHostListApi);
base.debug.assert(remoting.oauth2 === null);
remoting.oauth2 = new remoting.OAuth2();
@@ -250,7 +251,7 @@ QUnit.test('start with getHostClientId failure', function(assert) {
// Check what happens when the registry returns an HTTP when we try to
// register a host.
QUnit.test('start with host registration failure', function(assert) {
- mockHostListApi.registerResult = null;
+ mockHostListApi.authCodeFromRegister = null;
return controller.start(FAKE_HOST_PIN, true).then(function() {
throw 'test failed';
}, function(/** remoting.Error */ e) {
@@ -282,7 +283,7 @@ QUnit.test('start with getCredentialsFromAuthCode failure', function(assert) {
// does't return an auth code.
QUnit.test('start with getRefreshToken+getPinHash failure', function(assert) {
mockHostDaemonFacade.pinHashFunc = null;
- mockHostListApi.registerResult = '';
+ mockHostListApi.authCodeFromRegister = '';
return controller.start(FAKE_HOST_PIN, true).then(function() {
throw 'test failed';
}, function(/** remoting.Error */ e) {
@@ -394,7 +395,7 @@ QUnit.test('start with startDaemon returning failure code', function(assert) {
QUnit.test('start without auth code, consent=' + consent, function(assert) {
/** @const */
var fakePinHash = fakePinHashFunc(FAKE_HOST_ID, FAKE_HOST_PIN);
- mockHostListApi.registerResult = '';
+ mockHostListApi.authCodeFromRegister = '';
stubSignalStrategyConnect(true);
return controller.start(FAKE_HOST_PIN, consent).then(function() {
assert.equal(getCredentialsFromAuthCodeSpy.callCount, 0);

Powered by Google App Engine
This is Rietveld 408576698