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 /layout/reftests/css-optional | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
11 files changed, 105 insertions, 0 deletions
diff --git a/layout/reftests/css-optional/css-optional-button.html b/layout/reftests/css-optional/css-optional-button.html new file mode 100644 index 0000000000..8e7282ff79 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-button.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <link rel='stylesheet' type='text/css' href='css-optional-style.css'> + <body> + <button></button> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-dyn-1.html b/layout/reftests/css-optional/css-optional-dyn-1.html new file mode 100644 index 0000000000..8b02ad7190 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-dyn-1.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: Remove the required attribute to an input element + to make it optional. --> + <link rel='stylesheet' type='text/css' href='css-optional-style.css'> + + <script type="text/javascript"> + function removeRequired() + { + document.getElementById('i').removeAttribute('required'); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="removeRequired(); disableReftestWait();"> + <input id="i" required> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-dyn-2.html b/layout/reftests/css-optional/css-optional-dyn-2.html new file mode 100644 index 0000000000..746e045abf --- /dev/null +++ b/layout/reftests/css-optional/css-optional-dyn-2.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: Add the required attribute to an element to make it required. --> + <link rel='stylesheet' type='text/css' href='css-optional-style.css'> + + <script type="text/javascript"> + function addRequired() + { + document.getElementById('i').required = true; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="addRequired(); disableReftestWait();"> + <input id="i"> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-input-ref.html b/layout/reftests/css-optional/css-optional-input-ref.html new file mode 100644 index 0000000000..a7feec6b50 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-input-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <input> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-input.html b/layout/reftests/css-optional/css-optional-input.html new file mode 100644 index 0000000000..1292df6eb9 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-input.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <link rel='stylesheet' type='text/css' href='css-optional-style.css'> + <body> + <input> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-select-ref.html b/layout/reftests/css-optional/css-optional-select-ref.html new file mode 100644 index 0000000000..e419bb1845 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-select-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <select></select> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-select.html b/layout/reftests/css-optional/css-optional-select.html new file mode 100644 index 0000000000..a80a68a5a6 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-select.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <link rel='stylesheet' type='text/css' href='css-optional-style.css'> + <body> + <select></select> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-style.css b/layout/reftests/css-optional/css-optional-style.css new file mode 100644 index 0000000000..616aa79f0e --- /dev/null +++ b/layout/reftests/css-optional/css-optional-style.css @@ -0,0 +1,8 @@ +input, textarea, select, button, +*:required { + visibility: hidden; +} + +*:optional { + visibility: visible; +} diff --git a/layout/reftests/css-optional/css-optional-textarea-ref.html b/layout/reftests/css-optional/css-optional-textarea-ref.html new file mode 100644 index 0000000000..bde6f508f9 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-textarea-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <textarea></textarea> + </body> +</html> diff --git a/layout/reftests/css-optional/css-optional-textarea.html b/layout/reftests/css-optional/css-optional-textarea.html new file mode 100644 index 0000000000..2e85c4df54 --- /dev/null +++ b/layout/reftests/css-optional/css-optional-textarea.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <link rel='stylesheet' type='text/css' href='css-optional-style.css'> + <body> + <textarea></textarea> + </body> +</html> diff --git a/layout/reftests/css-optional/reftest.list b/layout/reftests/css-optional/reftest.list new file mode 100644 index 0000000000..18d34eaeb5 --- /dev/null +++ b/layout/reftests/css-optional/reftest.list @@ -0,0 +1,10 @@ +# Checking if these elements support :optional. +== css-optional-textarea.html css-optional-textarea-ref.html +== css-optional-input.html css-optional-input-ref.html +== css-optional-select.html css-optional-select-ref.html +== css-optional-button.html about:blank + +# Checking dynamic behavior. +== css-optional-dyn-1.html css-optional-input-ref.html +== css-optional-dyn-2.html about:blank + |