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

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

Issue 840023004: Implement mocks for identity and host-list, add a browser test to test the app in various failure m… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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/host_list_api.js ('k') | remoting/webapp/crd/js/oauth2_api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/host_list_api_impl.js
diff --git a/remoting/webapp/crd/js/host_list_api.js b/remoting/webapp/crd/js/host_list_api_impl.js
similarity index 88%
copy from remoting/webapp/crd/js/host_list_api.js
copy to remoting/webapp/crd/js/host_list_api_impl.js
index c9bb2cf22a3ad03a0b72b6c98a0eb6e231d57c22..35babb0124213158712d25b0b0cf350b5966c6f8 100644
--- a/remoting/webapp/crd/js/host_list_api.js
+++ b/remoting/webapp/crd/js/host_list_api_impl.js
@@ -12,8 +12,11 @@
/** @suppress {duplicate} */
var remoting = remoting || {};
-/** @constructor */
-remoting.HostListApi = function() {
+/**
+ * @constructor
+ * @implements {remoting.HostListApi}
+ */
+remoting.HostListApiImpl = function() {
};
/**
@@ -22,7 +25,7 @@ remoting.HostListApi = function() {
* @param {function(Array.<remoting.Host>):void} onDone
* @param {function(remoting.Error):void} onError
*/
-remoting.HostListApi.prototype.get = function(onDone, onError) {
+remoting.HostListApiImpl.prototype.get = function(onDone, onError) {
/** @type {function(XMLHttpRequest):void} */
var parseHostListResponse =
this.parseHostListResponse_.bind(this, onDone, onError)
@@ -44,7 +47,7 @@ remoting.HostListApi.prototype.get = function(onDone, onError) {
* @param {string} hostName
* @param {string} hostPublicKey
*/
-remoting.HostListApi.prototype.put =
+remoting.HostListApiImpl.prototype.put =
function(hostId, hostName, hostPublicKey, onDone, onError) {
/** @param {string} token */
var onToken = function(token) {
@@ -75,7 +78,7 @@ remoting.HostListApi.prototype.put =
* @param {function(remoting.Error):void} onError
* @param {string} hostId
*/
-remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) {
+remoting.HostListApiImpl.prototype.remove = function(hostId, onDone, onError) {
/** @param {string} token */
var onToken = function(token) {
var headers = { 'Authorization': 'OAuth ' + token };
@@ -97,7 +100,7 @@ remoting.HostListApi.prototype.remove = function(hostId, onDone, onError) {
* @param {XMLHttpRequest} xhr
* @private
*/
-remoting.HostListApi.prototype.parseHostListResponse_ =
+remoting.HostListApiImpl.prototype.parseHostListResponse_ =
function(onDone, onError, xhr) {
if (xhr.status == 200) {
var response = /** @type {{data: {items: Array}}} */
@@ -115,4 +118,4 @@ remoting.HostListApi.prototype.parseHostListResponse_ =
};
/** @type {remoting.HostListApi} */
-remoting.hostListApi = new remoting.HostListApi();
+remoting.hostListApi = new remoting.HostListApiImpl();
« no previous file with comments | « remoting/webapp/crd/js/host_list_api.js ('k') | remoting/webapp/crd/js/oauth2_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698