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

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

Issue 1065733004: Added partial unit tests for host_controller.js. More to come. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hdf-unittest
Patch Set: added licenses to satisfy presubmit 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
« no previous file with comments | « remoting/webapp/crd/js/mock_host_daemon_facade.js ('k') | remoting/webapp/crd/js/mock_xhr_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/mock_xhr.js
diff --git a/remoting/webapp/crd/js/mock_xhr.js b/remoting/webapp/crd/js/mock_xhr.js
index 590030ba7ce3797a7ac36f6df9bdf9403fdcc7bb..f224353eac61a71dec8dde60a9abfa92aecb87e8 100644
--- a/remoting/webapp/crd/js/mock_xhr.js
+++ b/remoting/webapp/crd/js/mock_xhr.js
@@ -190,17 +190,19 @@ remoting.MockXhr.setResponseFor = function(
};
/**
- * Installs a 204 (no content) response. See |setResponseFor| for
+ * Installs an emptresponse. See |setResponseFor| for
* more details on how the parameters work.
*
* @param {?string} method
* @param {?string|!RegExp} urlPattern
+ * @param {number=} opt_status
* @param {boolean=} opt_reuse
*/
-remoting.MockXhr.setEmptyResponseFor = function(method, urlPattern, opt_reuse) {
+remoting.MockXhr.setEmptyResponseFor = function(
+ method, urlPattern, opt_status, opt_reuse) {
remoting.MockXhr.setResponseFor(
method, urlPattern, function(/** remoting.MockXhr */ xhr) {
- xhr.setEmptyResponse(204);
+ xhr.setEmptyResponse(opt_status === undefined ? 204 : opt_status);
}, opt_reuse);
};
« no previous file with comments | « remoting/webapp/crd/js/mock_host_daemon_facade.js ('k') | remoting/webapp/crd/js/mock_xhr_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698