31 lines
693 B
HTML
31 lines
693 B
HTML
<!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>
|