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

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

Issue 1161813006: Updated handling of GCD devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops--ignore Created 5 years, 6 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
« no previous file with comments | « remoting/webapp/crd/js/legacy_host_list_api_unittest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/mock_host_list_api.js
diff --git a/remoting/webapp/crd/js/mock_host_list_api.js b/remoting/webapp/crd/js/mock_host_list_api.js
index e0298e4ae363485b8e0b9977759102bc28727075..3cead52c60e328123182855d86fd0e03f74ba8ea 100644
--- a/remoting/webapp/crd/js/mock_host_list_api.js
+++ b/remoting/webapp/crd/js/mock_host_list_api.js
@@ -31,6 +31,12 @@ remoting.MockHostListApi = function() {
*/
this.emailFromRegister = null;
+ /**
+ * This host ID to return from register(), or null if it should fail.
+ * @type {?string}
+ */
+ this.hostIdFromRegister = null;
+
/** @type {Array<remoting.Host>} */
this.hosts = [
{
@@ -56,7 +62,7 @@ remoting.MockHostListApi = function() {
/** @override */
remoting.MockHostListApi.prototype.register = function(
- newHostId, hostName, publicKey, hostClientId) {
+ hostName, publicKey, hostClientId) {
if (this.authCodeFromRegister === null || this.emailFromRegister === null) {
return Promise.reject(
new remoting.Error(
@@ -65,7 +71,8 @@ remoting.MockHostListApi.prototype.register = function(
} else {
return Promise.resolve({
authCode: this.authCodeFromRegister,
- email: this.emailFromRegister
+ email: this.emailFromRegister,
+ hostId: this.hostIdFromRegister
});
}
};
« no previous file with comments | « remoting/webapp/crd/js/legacy_host_list_api_unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698