Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/extendable-event-waituntil.js

Issue 2789003002: Upstream service worker ext. event tests to WPT (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/extendable-event-waituntil.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/extendable-event-waituntil.js b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/extendable-event-waituntil.js
index 48fdf1b99fd1931818e64f57c78af2fbe1087c50..20a9eb023f6213c793e148b2eefba7eab81ce79c 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/extendable-event-waituntil.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/extendable-event-waituntil.js
@@ -57,8 +57,20 @@ oninstall = function(e) {
e.waitUntil(fulfillPromise());
break;
case 'install-reject-precedence':
+ // Three "extend lifetime promises" are needed to verify that the user
+ // agent waits for all promises to settle even in the event of rejection.
+ // The first promise is fulfilled on demand by the client, the second is
+ // immediately scheduled for rejection, and the third is fulfilled on
+ // demand by the client (but only after the first promise has been
+ // fulfilled).
+ //
+ // User agents which simply expose `Promise.all` semantics in this case
+ // (by entering the "redundant state" following the rejection of the
+ // second promise but prior to the fulfillment of the third) can be
+ // identified from the client context.
e.waitUntil(fulfillPromise());
e.waitUntil(rejectPromise());
+ e.waitUntil(fulfillPromise());
break;
}
};

Powered by Google App Engine
This is Rietveld 408576698