Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<title>COEP and dedicated worker</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/worker-support.js"></script>
promise_test(async (t) => {
const worker1 = new Worker("/html/cross-origin-embedder-policy/resources/");
worker1.onerror = t.unreached_func('Worker.onerror should not be called for first worker');
const result1 = await waitForMessage(worker1);
assert_equals(, 'LOADED');
// Load the worker a second time, which should trigger revalidation of the cached resource.
const worker2 = new Worker("/html/cross-origin-embedder-policy/resources/");
worker2.onerror = t.unreached_func('Worker.onerror should not be called worker second worker');
const result2 = await waitForMessage(worker2);
assert_equals(, 'LOADED');
}, 'COEP: require-corp with revalidated worker script');