diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html new file mode 100644 index 0000000000..5e8acb1a17 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html @@ -0,0 +1,27 @@ +<!doctype html> +<title><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">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript\"");</script> + +<script type="text/javascript…">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript…\"");</script> + +<script type="text/javascript ">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> + +<script type="text/javascript ">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> + +<script type="text/javascript ">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> |