| 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>
|
|
|