Bug 1725695 [wpt PR 30023] - Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show(), a=testonly
authorStephen McGruer <smcgruer@chromium.org>
Sat, 14 Aug 2021 21:15:36 +0000
changeset 589004 61dcf8697495dd55b190a0cc92441e41c0acd8e7
parent 589003 2e78c4132f2ba636c6504bf108eeed5f6caa5f0b
child 589005 a355b31e7e6ae5224670c9faf20b4f2080b3f45e
push id148076
push userwptsync@mozilla.com
push dateSun, 15 Aug 2021 07:16:46 +0000
treeherderautoland@5dedfa40a55f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1725695, 30023
milestone93.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1725695 [wpt PR 30023] - Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show(), a=testonly Automatic update from web-platform-tests Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show() (#30023) See https://github.com/w3c/payment-request/pull/961 -- wpt-commits: ee2d179bcea6e4a697e89a99a245e4571bd65097 wpt-pr: 30023
testing/web-platform/tests/payment-request/payment-request-show-method.https.html
--- a/testing/web-platform/tests/payment-request/payment-request-show-method.https.html
+++ b/testing/web-platform/tests/payment-request/payment-request-show-method.https.html
@@ -41,27 +41,27 @@ promise_test(async (t) => {
   // Abort the request after 2 seconds if it has not rejected. This allows the
   // other tests in this file to run even if a non-compliant browser shows the
   // payment sheet without user activation.
   t.step_timeout(() => {
     t.force_timeout();
     request.abort();
   }, 2000);
 
-  await promise_rejects_dom(t, "NotAllowedError", acceptPromise);
+  await promise_rejects_dom(t, "SecurityError", acceptPromise);
 }, `Calling show() without being triggered by user interaction throws`);
 
 promise_test(async (t) => {
   const request = new PaymentRequest(defaultMethods, defaultDetails);
   await test_driver.bless(
     "test: throws if the promise [[state]] is not 'created'"
   );
   const acceptPromise = request.show(); // Sets state to "interactive"
   // No user activation...
-  await promise_rejects_dom(t, "NotAllowedError", request.show());
+  await promise_rejects_dom(t, "SecurityError", request.show());
 
   // Get user activation
   await test_driver.bless(
     "test: throws if the promise [[state]] is not 'created'"
   );
   await promise_rejects_dom(t, "InvalidStateError", request.show());
 
   await request.abort();
@@ -71,17 +71,17 @@ promise_test(async (t) => {
 promise_test(async (t) => {
   const request1 = new PaymentRequest(defaultMethods, defaultDetails);
   const request2 = new PaymentRequest(defaultMethods, defaultDetails);
 
   await test_driver.bless("payment request");
   const acceptPromise1 = request1.show();
 
   // User activation consumed, so...
-  await promise_rejects_dom(t, "NotAllowedError", request2.show());
+  await promise_rejects_dom(t, "SecurityError", request2.show());
 
   // Payment request already showing, so...
   await test_driver.bless("payment request");
   await promise_rejects_dom(t, "AbortError", request2.show());
 
   await request1.abort();
   await promise_rejects_dom(t, "AbortError", acceptPromise1);
 }, `If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException.`);