diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/html/scripting | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/scripting')
-rw-r--r-- | testing/web-platform/tests/html/scripting/the-script-element/attr-script-fetchpriority.html | 26 | ||||
-rw-r--r-- | testing/web-platform/tests/html/scripting/the-script-element/resources/script.js | 0 |
2 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/scripting/the-script-element/attr-script-fetchpriority.html b/testing/web-platform/tests/html/scripting/the-script-element/attr-script-fetchpriority.html new file mode 100644 index 0000000000..738c9eab74 --- /dev/null +++ b/testing/web-platform/tests/html/scripting/the-script-element/attr-script-fetchpriority.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<title>Fetch Priority - Script element</title> +<meta name="author" title="Patrick Meenan" href="mailto:patmeenan@gmail.com"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script id=script1 src="resources/script.js" fetchpriority=high></script> +<script id=script2 src="resources/script.js" fetchpriority=low></script> +<script id=script3 src="resources/script.js" fetchpriority=auto></script> +<script id=script4 src="resources/script.js" fetchpriority=xyz></script> +<script id=script5 src="resources/script.js"></script> + +<script> + test(() => { + assert_equals(script1.fetchPriority, "high", "high fetchPriority is a valid IDL value on the script element"); + assert_equals(script2.fetchPriority, "low", "low fetchPriority is a valid IDL value on the script element"); + assert_equals(script3.fetchPriority, "auto", "auto fetchPriority is a valid IDL value on the script element"); + assert_equals(script4.fetchPriority, "auto", "invalid fetchPriority reflects as 'auto' IDL attribute on the script element"); + assert_equals(script5.fetchPriority, "auto", "missing fetchPriority reflects as 'auto' IDL attribute on the script element"); + }, "fetchpriority attribute on <script> elements should reflect valid IDL values"); + + test(() => { + const script = document.createElement("script"); + assert_equals(script.fetchPriority, "auto"); + }, "default fetchpriority attribute on <script> elements should be 'auto'"); +</script> diff --git a/testing/web-platform/tests/html/scripting/the-script-element/resources/script.js b/testing/web-platform/tests/html/scripting/the-script-element/resources/script.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testing/web-platform/tests/html/scripting/the-script-element/resources/script.js |