summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-ui-valid/textarea
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/css-ui-valid/textarea
parentInitial commit. (diff)
downloadfirefox-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 'layout/reftests/css-ui-valid/textarea')
-rw-r--r--layout/reftests/css-ui-valid/textarea/reftest.list16
-rw-r--r--layout/reftests/css-ui-valid/textarea/style.css26
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-customerror.html18
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-1.html14
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-2.html23
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-disabled.html9
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-dyn-disabled.html18
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled-changed.html19
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled.html18
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly-changed.html19
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly.html18
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-dyn-readonly.html18
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend-ref.html11
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend.html14
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-fieldset-ref.html11
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-readonly.html9
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-ref.html7
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-required-invalid.html10
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-required-valid-changed.html11
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-required-valid.html10
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-valid.html9
-rw-r--r--layout/reftests/css-ui-valid/textarea/textarea-withtext-ref.html7
22 files changed, 315 insertions, 0 deletions
diff --git a/layout/reftests/css-ui-valid/textarea/reftest.list b/layout/reftests/css-ui-valid/textarea/reftest.list
new file mode 100644
index 0000000000..4f974408ff
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/reftest.list
@@ -0,0 +1,16 @@
+== textarea-valid.html textarea-ref.html
+== textarea-customerror.html textarea-ref.html
+== textarea-disabled.html textarea-ref.html
+== textarea-dyn-disabled.html textarea-ref.html
+== textarea-dyn-not-disabled.html textarea-ref.html
+== textarea-dyn-not-disabled-changed.html textarea-ref.html
+== textarea-readonly.html textarea-ref.html
+== textarea-dyn-readonly.html textarea-ref.html
+== textarea-dyn-not-readonly.html textarea-ref.html
+== textarea-dyn-not-readonly-changed.html textarea-ref.html
+== textarea-required-valid.html textarea-withtext-ref.html
+== textarea-required-valid-changed.html textarea-withtext-ref.html
+== textarea-required-invalid.html textarea-ref.html
+== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
+== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
+== textarea-fieldset-legend.html textarea-fieldset-legend-ref.html
diff --git a/layout/reftests/css-ui-valid/textarea/style.css b/layout/reftests/css-ui-valid/textarea/style.css
new file mode 100644
index 0000000000..3ffe6c687b
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/style.css
@@ -0,0 +1,26 @@
+/* Override default style */
+textarea {
+ border: 0px;
+}
+
+textarea.ref {
+ background-color: green;
+}
+
+textarea:invalid {
+ box-shadow: none;
+}
+
+textarea.notvalid {
+ background-color: green;
+}
+textarea.notvalid:-moz-ui-valid {
+ background-color: red;
+}
+
+textarea.valid {
+ background-color: red;
+}
+textarea.valid:-moz-ui-valid {
+ background-color: green;
+}
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-customerror.html b/layout/reftests/css-ui-valid/textarea/textarea-customerror.html
new file mode 100644
index 0000000000..f21239e47e
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-customerror.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').setCustomValidity('foo');
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea has a custom error, it should not be affected by :-moz-ui-valid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' id='t'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-1.html b/layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-1.html
new file mode 100644
index 0000000000..51c99bbbd9
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-1.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea has a disabled fieldset ancestor, it is barred from
+ constraint validation and should not be affected by :-moz-ui-valid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled>
+ <fieldset>
+ <textarea class='notvalid'></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-2.html b/layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-2.html
new file mode 100644
index 0000000000..4b7c6a7516
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-disabled-fieldset-2.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if textarea has a disabled fieldset ancestor, it is barred from
+ constraint validation and should not be affected by :-moz-ui-valid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function onloadHandler()
+ {
+ var fieldsets = document.getElementsByTagName("fieldset");
+ fieldsets[1].disabled = true;
+ fieldsets[0].disabled = false;
+ document.documentElement.className='';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset disabled>
+ <fieldset>
+ <textarea class='notvalid'></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-disabled.html b/layout/reftests/css-ui-valid/textarea/textarea-disabled.html
new file mode 100644
index 0000000000..12748dfa2e
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-disabled.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea is disabled, it is barred from constraint validation
+ and should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' disabled></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-dyn-disabled.html b/layout/reftests/css-ui-valid/textarea/textarea-dyn-disabled.html
new file mode 100644
index 0000000000..2759b856f3
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-dyn-disabled.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').disabled='true';
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea is disabled, it is barred from constraint validation
+ and should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' id='t'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled-changed.html b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled-changed.html
new file mode 100644
index 0000000000..f13b373fd1
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled-changed.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').removeAttribute('disabled');
+ document.getElementById('t').value = '';
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea is not disabled and its value has been modifie,
+ it should be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='valid' id='t' disabled></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled.html b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled.html
new file mode 100644
index 0000000000..0f59aa6131
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-disabled.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').removeAttribute('disabled');
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea is not disabled but its value hasn't been modified,
+ it should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' id='t' disabled></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly-changed.html b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly-changed.html
new file mode 100644
index 0000000000..c09c17b27c
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly-changed.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').removeAttribute('readonly');
+ document.getElementById('t').value = '';
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea is no longer readonly and its value has been modified,
+ it should be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='valid' id='t' readonly></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly.html b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly.html
new file mode 100644
index 0000000000..a797d13897
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-dyn-not-readonly.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').removeAttribute('readonly');
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea is no longer readonly but its value hasn't been modified,
+ it should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' id='t' readonly></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-dyn-readonly.html b/layout/reftests/css-ui-valid/textarea/textarea-dyn-readonly.html
new file mode 100644
index 0000000000..6350ac4fba
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-dyn-readonly.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').readOnly='ro';
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest);
+ </script>
+ </head>
+ <!-- Test: if textarea is readonly, it is barred from constraint validation
+ and should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' id='t'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend-ref.html b/layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend-ref.html
new file mode 100644
index 0000000000..8e81d23f1f
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset>
+ <legend>
+ <textarea class="ref"></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend.html b/layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend.html
new file mode 100644
index 0000000000..8ec6163742
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-fieldset-legend.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea has a disabled fieldset ancestor, but is in the first
+ legend, it is not barred from constraint validation and should be
+ affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled>
+ <legend>
+ <textarea class='notvalid'></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-fieldset-ref.html b/layout/reftests/css-ui-valid/textarea/textarea-fieldset-ref.html
new file mode 100644
index 0000000000..1d01eb0438
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-fieldset-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset>
+ <fieldset>
+ <textarea class="ref"></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-readonly.html b/layout/reftests/css-ui-valid/textarea/textarea-readonly.html
new file mode 100644
index 0000000000..f75dea1716
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-readonly.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea is readonly, it is barred from constraint validation
+ and should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' readonly></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-ref.html b/layout/reftests/css-ui-valid/textarea/textarea-ref.html
new file mode 100644
index 0000000000..b370a02a0f
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class="ref"></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-required-invalid.html b/layout/reftests/css-ui-valid/textarea/textarea-required-invalid.html
new file mode 100644
index 0000000000..adbef2e790
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-required-invalid.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea isn't valid nor barred from constraint validation,
+ it should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' required></textarea>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-required-valid-changed.html b/layout/reftests/css-ui-valid/textarea/textarea-required-valid-changed.html
new file mode 100644
index 0000000000..f6357d8bcc
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-required-valid-changed.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html class='reftet-wait'>
+ <!-- Test: if textarea is valid and its value has been modified,
+ it should be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('t').value = 'foo';
+ document.documentElement.className = '';">
+ <textarea id='t' class='valid' required></textarea>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-required-valid.html b/layout/reftests/css-ui-valid/textarea/textarea-required-valid.html
new file mode 100644
index 0000000000..e7cf83dc6e
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-required-valid.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea is valid but its value hasn't been modified,
+ it should not be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid' required>foo</textarea>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-valid.html b/layout/reftests/css-ui-valid/textarea/textarea-valid.html
new file mode 100644
index 0000000000..4b24c17b59
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-valid.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea is valid and is not barred from constraint validation,
+ it should be affected by :-moz-ui-valid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notvalid'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-valid/textarea/textarea-withtext-ref.html b/layout/reftests/css-ui-valid/textarea/textarea-withtext-ref.html
new file mode 100644
index 0000000000..a6a2b79cfa
--- /dev/null
+++ b/layout/reftests/css-ui-valid/textarea/textarea-withtext-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class="ref">foo</textarea>
+ </body>
+</html>