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

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

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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-with-pending-fetch.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-with-pending-fetch.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-with-pending-fetch.html
new file mode 100644
index 0000000000000000000000000000000000000000..df0d238e3da6fe008c2ce97211a313a6fc84a655
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/stop-worker-with-pending-fetch.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../resources/test-helpers.js"></script>
+<body>
+<script>
+promise_test(function(t) {
+ var url = 'resources/stop-worker-with-pending-fetch.js';
+ var scope = 'resources/stop-worker-with-pending-fetch-scope/';
+ var registration;
+
+ return service_worker_unregister_and_register(t, url, scope)
+ .then(reg => {
+ registration = reg;
+ return wait_for_state(t, reg.installing, 'activated');
+ })
+ .then(_ => with_iframe(scope))
+ .then(_ => internals.terminateServiceWorker(registration.active))
+ .then(_ => with_iframe(scope)) // Check the sanity of the SW.
+ .then(_ => service_worker_unregister(t, scope));
+ }, 'Stopping SW with pending fetch event should not cause crash.');
+</script>
+</body>
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/stop-worker-with-pending-fetch.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698