diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js')
-rw-r--r-- | toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js b/toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js index 489cc3a754..57aed8a700 100644 --- a/toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js +++ b/toolkit/components/extensions/test/xpcshell/webidl-api/test_ext_webidl_api.js @@ -55,7 +55,7 @@ add_task(async function test_propagated_extension_error() { throw err; } }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return { type: Ci.mozIExtensionAPIRequestResult.EXTENSION_ERROR, value: new Error("Fake Extension Error"), @@ -76,7 +76,7 @@ add_task(async function test_system_errors_donot_leak() { ); } - function mockAPIRequestHandler(policy, request) { + function mockAPIRequestHandler() { throw new Error("Fake handleAPIRequest exception"); } @@ -183,7 +183,7 @@ add_task(async function test_call_sync_fn_missing_return() { backgroundScript() { self.browser.mockExtensionAPI.methodSyncWithReturn("arg0"); }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return undefined; }, assertResults({ testError }) { @@ -208,7 +208,7 @@ add_task(async function test_call_async_throw_extension_error() { throw err; } }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return { type: Ci.mozIExtensionAPIRequestResult.EXTENSION_ERROR, value: new Error("Fake Param Validation Error"), @@ -233,7 +233,7 @@ add_task(async function test_call_async_reject_error() { throw err; } }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return { type: Ci.mozIExtensionAPIRequestResult.RETURN_VALUE, value: Promise.reject(new Error("Fake API rejected error object")), @@ -311,7 +311,7 @@ add_task(async function test_call_no_return_throw_extension_error() { throw err; } }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return { type: Ci.mozIExtensionAPIRequestResult.EXTENSION_ERROR, value: new Error("Fake Param Validation Error"), @@ -331,7 +331,7 @@ add_task(async function test_call_no_return_without_errors() { backgroundScript() { self.browser.mockExtensionAPI.methodNoReturn("arg0"); }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return undefined; }, assertResults({ testError }) { @@ -446,7 +446,7 @@ add_task(async function test_get_property() { backgroundScript() { return self.browser.mockExtensionAPI.propertyAsString; }, - mockAPIRequestHandler(policy, request) { + mockAPIRequestHandler() { return { type: Ci.mozIExtensionAPIRequestResult.RETURN_VALUE, value: "property-value", @@ -478,7 +478,7 @@ add_task(async function test_get_property() { value: ChromeUtils.createError("fake extension error", savedFrame), }; }, - assertResults({ testError, testResult }) { + assertResults({ testError }) { Assert.deepEqual(testError, null, "Got no error as expected"); }, } |