testing/web-platform/tests/service-workers/service-worker/import-scripts-cross-origin.https.html
author dadaa <daisuke.akatsuka@birchill.co.jp>
Wed, 09 Jul 2025 04:53:58 +0000 (6 hours ago)
changeset 795836 a5500d271fe3a1fefb4d81d96fc4abd00d9eade7
parent 557742 8f61ccbd06a40e6b59d3025f95d34e31e6c11128
permissions -rw-r--r--
Bug 1957280: Limit user's mouse amount for tree component r=places-reviewers,reusable-components-reviewers,masayuki,mstriemer Differential Revision: https://phabricator.services.mozilla.com/D251224
<!DOCTYPE html>
<meta charset="utf-8">
<title>Tests for importScripts: cross-origin</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/test-helpers.sub.js"></script>
<body>
<script>
promise_test(async t => {
    const scope = 'resources/import-scripts-cross-origin';
    await service_worker_unregister(t, scope);
    let reg = await navigator.serviceWorker.register(
      'resources/import-scripts-cross-origin-worker.sub.js', { scope: scope });
    t.add_cleanup(_ => reg.unregister());
    assert_not_equals(reg.installing, null, 'worker is installing');
  }, 'importScripts() supports cross-origin requests');
</script>
</body>