summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html
blob: 5e8acb1a17bace7ad5f55ac9a3545bbb1220ae10 (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>
<title>&lt;script type> non-ASCII whitespace handling</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
function testParserInsertedDidNotRun(description) {
  test(() => assert_false(window.ran),
       "Script shouldn't run with " + description + " (parser-inserted)");
  window.ran = false;
}
</script>

<script>window.ran = false;</script>
<script type="text/javascript&#x000B;">window.ran = true;</script>
<script>testParserInsertedDidNotRun("type=\"text/javascript&#x000B;\"");</script>

<script type="text/javascript&#x0085;">window.ran = true;</script>
<script>testParserInsertedDidNotRun("type=\"text/javascript&#x0085;\"");</script>

<script type="text/javascript&#x00A0;">window.ran = true;</script>
<script>testParserInsertedDidNotRun("type=\"text/javascript&#x00A0;\"");</script>

<script type="text/javascript&#x1680;">window.ran = true;</script>
<script>testParserInsertedDidNotRun("type=\"text/javascript&#x1680;\"");</script>

<script type="text/javascript&#x3000;">window.ran = true;</script>
<script>testParserInsertedDidNotRun("type=\"text/javascript&#x3000;\"");</script>