servo/tests/wpt/web-platform-tests/web-locks/interfaces-serviceworker.tentative.https.html

21 lines
660 B
HTML

<!DOCTYPE html>
<meta charset=utf-8>
<title>Web Locks API: WebIDL tests in service worker</title>
<link rel=help href="https://wicg.github.io/web-locks/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
(async () => {
const scope = 'resources/does/not/exist';
let registration = await navigator.serviceWorker.getRegistration(scope);
if (registration)
await registration.unregister();
registration = await navigator.serviceWorker.register(
'resources/interfaces-serviceworker.js', {scope});
fetch_tests_from_worker(registration.installing);
})();
</script>