Commit 9f5364be authored by Daniel Soromou's avatar Daniel Soromou Committed by Commit Bot

Service Worker: Fetch event added asynchronously doesn't throw.

Based on the spec (https://github.com/whatwg/dom/pull/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/+/1838376Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: Daniel Soromou <fosoromo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#702753}
parent 3e12133d
<!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>
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');
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment