test_bug_1865410.html (921B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <title>Bug 1865410: Test interaction between speculative preload and import maps</title> 4 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 8 <!-- Insert an import map after we have started preloading the modules. --> 9 <div id="container"></div> 10 <script> 11 let script = document.createElement("script"); 12 script.type = "importmap"; 13 script.textContent = "{}"; 14 let container = document.getElementById("container"); 15 container.appendChild(script); 16 </script> 17 18 <!-- Load the first module which will load the second via an import. --> 19 <script type="module" src="bug_1865410_module_a.mjs" async></script> 20 <script src="../../slow.sjs"></script> 21 22 <!-- Load the second, already loaded module. --> 23 <script type="module", src="bug_1865410_module_b.mjs"></script> 24 25 <script> 26 ok(true, "Didn't crash"); 27 </script>