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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js

Issue 2404233002: Aborts all pending fetch event callbacks in ServiceWorkerContextClient::willDestroyWorkerContext. (Closed)
Patch Set: incorporated shimazu's comment Created 4 years, 2 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/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js
new file mode 100644
index 0000000000000000000000000000000000000000..7612bab9943e07a4559fee01900db901ec6ea58e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js
@@ -0,0 +1,6 @@
+self.addEventListener('fetch', evt => {
+ // Retruns an empty response to resolve with_iframe() in the test page.
+ evt.respondWith(new Response(''));
+ // Keeps this event alive.
+ evt.waitUntil(new Promise(function() {}));
+ });

Powered by Google App Engine
This is Rietveld 408576698