diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html new file mode 100644 index 0000000000..977ee7d0a4 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-type-and-language-with-params.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<title>Script @type and @language: unknown type parameters</title> +<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> +<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#prepare-a-script"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<!-- Setup --> +<script> +window.run1 = window.run2 = window.run3 = false; +</script> + +<!-- Systems under test --> +<script type="text/javascript;charset=UTF-8"> +window.run1 = true; +</script> + +<script type="text/javascript;x-test=abc"> +window.run2 = true; +</script> + +<script language="javascript" type="text/javascript;charset=UTF-8"> +window.run3 = true; +</script> + +<!-- Asserts --> +<script> +test(() => { + assert_false(window.run1); +}, "A script with a charset param in its type should not run"); + +test(() => { + assert_false(window.run2); +}, "A script with an x-test param in its type should not run"); + +test(() => { + assert_false(window.run3); +}, "A script with a charset param in its type should not run, even with language=javascript"); +</script> |