summaryrefslogtreecommitdiffstats
path: root/dom/base/test/jsmodules/importmaps/test_bug_1865410.html
blob: a59aba368d9a2337c3c7c181519a368e4e4017e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<meta charset=utf-8>
<title>Bug 1865410: Test interaction between speculative preload and import maps</title>

<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>

<!-- Insert an import map after we have started preloading the modules. -->
<div id="container"></div>
<script>
  let script = document.createElement("script");
  script.type = "importmap";
  script.textContent = "{}";
  let container = document.getElementById("container");
  container.appendChild(script);
</script>

<!-- Load the first module which will load the second via an import. -->
<script type="module" src="bug_1865410_module_a.mjs" async></script>
<script src="../../slow.sjs"></script>

<!-- Load the second, already loaded module. -->
<script type="module", src="bug_1865410_module_b.mjs"></script>

<script>
  ok(true, "Didn't crash");
</script>