diff options
Diffstat (limited to 'services/fxaccounts/tests/xpcshell/test_profile_client.js')
-rw-r--r-- | services/fxaccounts/tests/xpcshell/test_profile_client.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/fxaccounts/tests/xpcshell/test_profile_client.js b/services/fxaccounts/tests/xpcshell/test_profile_client.js index 22fcc293f8..5b6e4ffdff 100644 --- a/services/fxaccounts/tests/xpcshell/test_profile_client.js +++ b/services/fxaccounts/tests/xpcshell/test_profile_client.js @@ -39,7 +39,7 @@ let mockResponse = function (response) { Request.ifNoneMatchSet = true; } }, - async dispatch(method, payload) { + async dispatch() { this.response = response; return this.response; }, @@ -74,7 +74,7 @@ let mockResponseError = function (error) { return function () { return { setHeader() {}, - async dispatch(method, payload) { + async dispatch() { throw error; }, }; @@ -221,7 +221,7 @@ add_test(function server401ResponseThenSuccess() { let numRequests = 0; let numAuthHeaders = 0; // Like mockResponse but we want access to headers etc. - client._Request = function (requestUri) { + client._Request = function () { return { setHeader(name, value) { if (name == "Authorization") { @@ -229,7 +229,7 @@ add_test(function server401ResponseThenSuccess() { Assert.equal(value, "Bearer " + lastToken); } }, - async dispatch(method, payload) { + async dispatch() { this.response = responses[numRequests]; ++numRequests; return this.response; @@ -283,7 +283,7 @@ add_test(function server401ResponsePersists() { let numRequests = 0; let numAuthHeaders = 0; - client._Request = function (requestUri) { + client._Request = function () { return { setHeader(name, value) { if (name == "Authorization") { @@ -291,7 +291,7 @@ add_test(function server401ResponsePersists() { Assert.equal(value, "Bearer " + lastToken); } }, - async dispatch(method, payload) { + async dispatch() { this.response = response; ++numRequests; return this.response; |