Skip to content

Commit

Permalink
Bug 1586084 [wpt PR 19496] - Service Worker: Fetch event added asynch…
Browse files Browse the repository at this point in the history
…ronously doesn't throw., a=testonly

Automatic update from web-platform-tests
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}

--

wpt-commits: 42efecfdb246ea0f22b5a82f5c13659894de3d72
wpt-pr: 19496
  • Loading branch information
caporalCoder authored and moz-wptsync-bot committed Oct 14, 2019
1 parent c14da1a commit 75b2667
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>Service Worker: Fetch event added asynchronously doesn't throw</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/test-helpers.sub.js"></script>
<script>
'use strict';

service_worker_test(
'resources/fetch-event-add-async-worker.js');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
importScripts('/resources/testharness.js');

promise_test(async () => {
await new Promise(handler => { step_timeout(handler, 0); });
self.addEventListener('fetch', () => {});
}, 'fetch event added asynchronously does not throw');

0 comments on commit 75b2667

Please sign in to comment.