Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 42efecf

Browse files
Daniel Soromouchromium-wpt-export-bot
authored andcommitted
Service Worker: Fetch event added asynchronously doesn't throw.
Based on the spec (whatwg/dom#653), addEventListener after the first evaluation of the Service worker script should not throw. Change-Id: I46af276a67e021cf277a98195bf5c04583ad0b0a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838376 Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Daniel Soromou <[email protected]> Cr-Commit-Position: refs/heads/master@{#702753}
1 parent c5b1651 commit 42efecf

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<title>Service Worker: Fetch event added asynchronously doesn't throw</title>
3+
<script src="/resources/testharness.js"></script>
4+
<script src="/resources/testharnessreport.js"></script>
5+
<script src="resources/test-helpers.sub.js"></script>
6+
<script>
7+
'use strict';
8+
9+
service_worker_test(
10+
'resources/fetch-event-add-async-worker.js');
11+
</script>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
importScripts('/resources/testharness.js');
2+
3+
promise_test(async () => {
4+
await new Promise(handler => { step_timeout(handler, 0); });
5+
self.addEventListener('fetch', () => {});
6+
}, 'fetch event added asynchronously does not throw');

0 commit comments

Comments
 (0)