blob: 9ae689be3b1d27dd505aa43b1aff779d5c32faee (
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
28
29
30
31
32
33
34
35
36
37
38
39
|
<!DOCTYPE html>
<meta charset=utf-8>
<title>Bug 1873417: Test if import-maps will block module script execution</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script>
(function () {
const script = document.createElement('script');
script.type = 'importmap';
script.textContent = '{}';
document.head.appendChild(script);
}());
</script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script>
let hasError = false;
var state;
SimpleTest.waitForExplicitFinish();
function scriptError() {
hasError = true;
}
function testLoaded() {
ok(!hasError, 'module script should be loaded');
info("state:" + state);
ok(state === "loaded", "'state' should be set to 'loaded'");
SimpleTest.finish();
}
</script>
<body onload="testLoaded()">
<script src="bug_1873417.mjs" type="module" onerror="scriptError()"></script>
</body>
|