Bug 1508199 [wpt PR 14117] - Make sure rejected promise is unique, a=testonly
authorMarcos Cáceres <marcos@marcosc.com>
Thu, 22 Nov 2018 10:33:58 +0000
changeset 507117 7433f8fac49ab00d576e5ddb4b6d529a67b59478
parent 507116 5ac1a86bd492464eed245a53e93d8f2af2e7db7a
child 507118 aca5ae992b39290a8795af5a6c92a12fa544e177
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1508199, 14117
milestone65.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 1508199 [wpt PR 14117] - Make sure rejected promise is unique, a=testonly Automatic update from web-platform-testsMake sure rejected promise is unique (#14117) -- wpt-commits: 489c4824471fab56ec6238ed6927cf1b69a978ff wpt-pr: 14117
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
@@ -50,22 +50,40 @@ function repeatedCallsToRetry(button) {
   }, button.textContent.trim());
 }
 
 function callCompleteWhileRetrying(button) {
   button.disabled = true;
   promise_test(async t => {
     const { response } = await getPaymentRequestResponse();
     const retryPromise = response.retry();
+    const completePromise1 = response.complete("success");
+    const completePromise2 = response.complete("failure");
+    assert_not_equals(
+      completePromise1,
+      completePromise2,
+      "complete() must return unique promises"
+    );
     await promise_rejects(
       t,
       "InvalidStateError",
-      response.complete("success"),
+      completePromise1,
       "Calling complete() while retrying rejects with an InvalidStateError"
     );
+    await promise_rejects(
+      t,
+      "InvalidStateError",
+      completePromise2,
+      "Calling complete() while retrying rejects with an InvalidStateError"
+    );
+    assert_not_equals(
+      completePromise1,
+      completePromise2,
+      "complete() must return unique promises"
+    );
     await retryPromise;
     await response.complete("success");
   }, button.textContent.trim());
 }
 
 function callingRequestAbortMustNotAbort(button) {
   button.disabled = true;
   promise_test(async t => {