summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-optional
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/css-optional
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/css-optional')
-rw-r--r--layout/reftests/css-optional/css-optional-button.html7
-rw-r--r--layout/reftests/css-optional/css-optional-dyn-1.html21
-rw-r--r--layout/reftests/css-optional/css-optional-dyn-2.html20
-rw-r--r--layout/reftests/css-optional/css-optional-input-ref.html6
-rw-r--r--layout/reftests/css-optional/css-optional-input.html7
-rw-r--r--layout/reftests/css-optional/css-optional-select-ref.html6
-rw-r--r--layout/reftests/css-optional/css-optional-select.html7
-rw-r--r--layout/reftests/css-optional/css-optional-style.css8
-rw-r--r--layout/reftests/css-optional/css-optional-textarea-ref.html6
-rw-r--r--layout/reftests/css-optional/css-optional-textarea.html7
-rw-r--r--layout/reftests/css-optional/reftest.list10
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
+