Debian Codegraph @

testing/web-platform/tests/streams/transferable/service-worker.https.html

raw
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
6 <script>
7 'use strict';
8
9 const kServiceWorkerUrl = 'resources/service-worker.js';
10 const kIframeUrl = 'resources/service-worker-iframe.html';
11
12 // A dummy test so that we can use the test-helpers.sub.js functions
13 const test = async_test('service-worker');
14
15 async function registerAndStart() {
16 const reg = await service_worker_unregister_and_register(
17 test, kServiceWorkerUrl, kIframeUrl);
18 await wait_for_state(test, reg.installing, 'activated');
19 const iframe = await with_iframe(kIframeUrl);
20 fetch_tests_from_window(iframe.contentWindow);
21 add_completion_callback(() => iframe.remove());
22 iframe.contentWindow.postMessage('explicit trigger', '*');
23 return service_worker_unregister_and_done(test, kIframeUrl);
24 }
25
26 onload = registerAndStart;
27
28 </script>