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), |
+ []); |
}; |
/** |