Chromium Code Reviews| 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 706badbf82fbc69d44afc39953c51a52606a9ec2..4fa5954acd8e798e5ad2bbb490243fe7023f6f23 100644 |
| --- a/remoting/webapp/crd/js/mock_xhr.js |
| +++ b/remoting/webapp/crd/js/mock_xhr.js |
| @@ -184,12 +184,14 @@ remoting.MockXhr.setResponseFor = function( |
| * |
| * @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 == null ? 204 : opt_status); |
|
Jamie
2015/04/07 01:13:12
For the most common invocation, opt_status will be
John Williams
2015/04/07 20:10:26
In google3 I'd use goog.isDef, but here I've been
Jamie
2015/04/08 00:16:14
I guess the question here is whether or not we wan
|
| }, opt_reuse); |
| }; |