Bug 1828992: test. r=jonco

Depends on D175912

Differential Revision: https://phabricator.services.mozilla.com/D175943
This commit is contained in:
Yoshi Cheng-Hao Huang 2023-08-07 14:39:51 +00:00
parent c562764160
commit 1dba4fdce2
3 changed files with 38 additions and 0 deletions

View File

@ -150,6 +150,8 @@ skip-if = true # bug 1176225
[test_dataURLWorker.html]
[test_dynamicImport.html]
[test_dynamicImport_early_termination.html]
[test_dynamicImport_and_terminate.html]
support-files = worker_dynamicImport.mjs
[test_errorPropagation.html]
skip-if =
http3

View File

@ -0,0 +1,34 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Worker create script loader failure</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
document.addEventListener("DOMContentLoaded", () => {
const worker = new Worker("worker_dynamicImport.mjs", {"type": "module"});
setTimeout(() => {
worker.terminate();
ok(true, "done");
SimpleTest.finish();
}, 0);
});
</script>
</pre>
</body>
</html>

View File

@ -0,0 +1,2 @@
/* eslint-disable import/no-unresolved */
const { o } = await import("./404.js");