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

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

Issue 927373005: [Chromoting] Enable jscompile for browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update all_browsertest var in gyp comment Created 5 years, 10 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/browser_test/mock_host_list_api.js
diff --git a/remoting/webapp/browser_test/mock_host_list_api.js b/remoting/webapp/browser_test/mock_host_list_api.js
index 144c20fb397ad6a8190ae9a92b86557224b7d1c6..5f6dff1814d694d11b759ffd42b5cb928105d4f8 100644
--- a/remoting/webapp/browser_test/mock_host_list_api.js
+++ b/remoting/webapp/browser_test/mock_host_list_api.js
@@ -45,15 +45,18 @@ remoting.MockHostListApi = function() {
* @param {function(remoting.Error):void} onError
*/
remoting.MockHostListApi.prototype.get = function(onDone, onError) {
- remoting.mockIdentity.validateTokenAndCall(onDone, onError, [this.hosts]);
+ remoting.mockIdentity.validateTokenAndCall(
+ /** @type {function():void} */ (onDone),
Jamie 2015/02/18 00:51:33 This doesn't look right. Is the issue simply that
garykac 2015/02/18 02:06:49 Using @type {Function} on validateTokenAndCall mak
+ /** @type {function():void} */ (onError),
Jamie 2015/02/18 00:51:33 IIRC, the error callback always has the same signa
garykac 2015/02/18 02:06:49 Done.
+ [this.hosts]);
};
/**
- * @param {function():void} onDone
- * @param {function(remoting.Error):void} onError
* @param {string} hostId
* @param {string} hostName
* @param {string} hostPublicKey
+ * @param {function():void} onDone
+ * @param {function(remoting.Error):void} onError
*/
remoting.MockHostListApi.prototype.put =
function(hostId, hostName, hostPublicKey, onDone, onError) {
@@ -73,13 +76,16 @@ remoting.MockHostListApi.prototype.put =
' (' + hostName + ')');
onError(remoting.Error.UNEXPECTED);
};
- remoting.mockIdentity.validateTokenAndCall(onTokenValid, onError, []);
+ remoting.mockIdentity.validateTokenAndCall(
+ onTokenValid,
+ /** @type {function():void} */ (onError),
+ []);
};
/**
+ * @param {string} hostId
* @param {function():void} onDone
* @param {function(remoting.Error):void} onError
- * @param {string} hostId
*/
remoting.MockHostListApi.prototype.remove =
function(hostId, onDone, onError) {
@@ -97,7 +103,10 @@ remoting.MockHostListApi.prototype.remove =
console.error('DELETE request for unknown host: ' + hostId);
onError(remoting.Error.UNEXPECTED);
};
- remoting.mockIdentity.validateTokenAndCall(onTokenValid, onError, []);
+ remoting.mockIdentity.validateTokenAndCall(
+ onTokenValid,
+ /** @type {function():void} */ (onError),
+ []);
};
/**

Powered by Google App Engine
This is Rietveld 408576698