Bug 1523562 [wpt PR 14918] - fix: buggy test and description, a=testonly
authorMarcos Cáceres <marcos@marcosc.com>
Thu, 31 Jan 2019 18:57:10 +0000
changeset 458033 5bc48eb55777540e35612bb70b2a86861cb6be36
parent 458032 ccd88b14de027418f1d3d4a02ff7e80776b58c32
child 458034 c9f1c0164f08a629252a16e36efdb71976a11bf3
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1523562, 14918
milestone67.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 1523562 [wpt PR 14918] - fix: buggy test and description, a=testonly Automatic update from web-platform-tests fix: buggy test and description (#14918) -- wpt-commits: 0ac8c4f740e9c37713f16fca1ce6cb0f3c5bc44c wpt-pr: 14918
testing/web-platform/tests/payment-request/payment-response/retry-method-manual.https.html
--- a/testing/web-platform/tests/payment-request/payment-response/retry-method-manual.https.html
+++ b/testing/web-platform/tests/payment-request/payment-response/retry-method-manual.https.html
@@ -159,26 +159,28 @@ function userIsShownErrorsFields(button)
     await retryPromise;
     await response.complete("success");
   }, button.textContent.trim());
 }
 
 function abortTheUpdate(button) {
   button.disabled = true;
   promise_test(async t => {
-    const { response, request } = await getPaymentRequestResponse({ requestShipping: true });
-    // causes "abort the update" to run
-    const shippingChangedPromise = new Promise(resolve => {
-      request.onshippingoptionchange = () => {
-        event.updateWith({ total: { amount: { currency: "USD", value: "INVALID" } }});
+    const { response, request } = await getPaymentRequestResponse({
+      requestShipping: true,
+    });
+    const shipOptionChangePromise = new Promise(resolve => {
+      request.onshippingoptionchange = event => {
+        // causes "abort the update" to run
+        event.updateWith({ total: "error!" });
         resolve();
       };
     });
     const retryPromise = response.retry();
-    await shippingChangedPromise;
+    await shipOptionChangePromise;
     await promise_rejects(
       t,
       new TypeError(),
       retryPromise,
       "retry() aborts with a TypeError, because totals' value is invalid"
     );
     await promise_rejects(
       t,
@@ -260,17 +262,19 @@ function callingRetryReturnsUniquePromis
       Then hit escape or otherwise abort the payment.
     </p>
     <button onclick="userIsShownErrorsFields(this);">
       When retrying, the user is shown error fields to fix.
     </button>
   </li>
   <li>
     <p>
-      When shown the payment sheet, hit pay once. Then retry once.
+      When shown the payment sheet, hit pay once.
+      Then, change the shipping option.
+      Select to pay again.
     </p>
     <button onclick="abortTheUpdate(this);">
       When "abort the update" occurs because of an update error,
       the `retryPromise` is rejected and response.[[complete]] becomes true.
     </button>
   </li>
   <li>
     <p>