blob: 7ab14d9b67cf11d8e236d7f6ccc1352118d48b3f (
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
|
<!DOCTYPE HTML>
<html>
<head>
<title>Test for ScriptLoader and type with whitespaces</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript">
let passed = false;
let tests = [
" application/javascript",
"\tapplication/javascript\n\r \t",
];
for (let i = 0; i < tests.length; ++i) {
passed = false;
let script = document.createElement('script');
script.setAttribute('type', tests[i]);
script.innerText = "passed = true;";
document.body.appendChild(script);
ok (passed, "Test " + tests[i] + " passed");
}
</script>
</body>
</html>
|