summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-ui-invalid/textarea
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/reftests/css-ui-invalid/textarea
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/css-ui-invalid/textarea')
-rw-r--r--layout/reftests/css-ui-invalid/textarea/reftest-stylo.list19
-rw-r--r--layout/reftests/css-ui-invalid/textarea/reftest.list15
-rw-r--r--layout/reftests/css-ui-invalid/textarea/style.css26
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-customerror.html18
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-disabled-fieldset-1.html14
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-disabled-fieldset-2.html23
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-disabled.html9
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-dyn-disabled.html19
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-disabled.html20
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-changed.html19
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-not-changed.html18
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-dyn-readonly.html18
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-fieldset-legend-ref.html11
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-fieldset-legend.html14
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-fieldset-ref.html11
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-novalidate.html10
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-readonly.html9
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-ref.html7
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-required-invalid-changed.html19
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-required-invalid.html10
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-required-valid.html10
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-valid.html9
-rw-r--r--layout/reftests/css-ui-invalid/textarea/textarea-withtext-ref.html7
23 files changed, 335 insertions, 0 deletions
diff --git a/layout/reftests/css-ui-invalid/textarea/reftest-stylo.list b/layout/reftests/css-ui-invalid/textarea/reftest-stylo.list
new file mode 100644
index 000000000..7ef5790a4
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/reftest-stylo.list
@@ -0,0 +1,19 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== textarea-valid.html textarea-valid.html
+== textarea-customerror.html textarea-customerror.html
+== textarea-disabled.html textarea-disabled.html
+== textarea-dyn-disabled.html textarea-dyn-disabled.html
+== textarea-dyn-not-disabled.html textarea-dyn-not-disabled.html
+== textarea-readonly.html textarea-readonly.html
+== textarea-dyn-readonly.html textarea-dyn-readonly.html
+== textarea-dyn-not-readonly-not-changed.html textarea-dyn-not-readonly-not-changed.html
+== textarea-dyn-not-readonly-changed.html textarea-dyn-not-readonly-changed.html
+skip == textarea-maxlength-valid.html textarea-maxlength-valid.html
+skip == textarea-maxlength-invalid.html textarea-maxlength-invalid.html
+skip == textarea-maxlength-default-value-invalid.html textarea-maxlength-default-value-invalid.html
+== textarea-required-valid.html textarea-required-valid.html
+== textarea-required-invalid.html textarea-required-invalid.html
+== textarea-required-invalid-changed.html textarea-required-invalid-changed.html
+== textarea-disabled-fieldset-1.html textarea-disabled-fieldset-1.html
+== textarea-disabled-fieldset-2.html textarea-disabled-fieldset-2.html
+== textarea-novalidate.html textarea-novalidate.html
diff --git a/layout/reftests/css-ui-invalid/textarea/reftest.list b/layout/reftests/css-ui-invalid/textarea/reftest.list
new file mode 100644
index 000000000..3d37890d6
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/reftest.list
@@ -0,0 +1,15 @@
+== 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-readonly.html textarea-ref.html
+== textarea-dyn-readonly.html textarea-ref.html
+== textarea-dyn-not-readonly-not-changed.html textarea-ref.html
+== textarea-dyn-not-readonly-changed.html textarea-ref.html
+== textarea-required-valid.html textarea-withtext-ref.html
+== textarea-required-invalid.html textarea-ref.html
+== textarea-required-invalid-changed.html textarea-ref.html
+== textarea-disabled-fieldset-1.html textarea-fieldset-ref.html
+== textarea-disabled-fieldset-2.html textarea-fieldset-ref.html
+== textarea-novalidate.html textarea-ref.html
diff --git a/layout/reftests/css-ui-invalid/textarea/style.css b/layout/reftests/css-ui-invalid/textarea/style.css
new file mode 100644
index 000000000..5d78b21de
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/style.css
@@ -0,0 +1,26 @@
+/* Override default style */
+textarea {
+ border: 0px;
+}
+
+textarea.ref {
+ background-color: green;
+}
+
+textarea:-moz-ui-invalid {
+ box-shadow: none;
+}
+
+textarea.notinvalid {
+ background-color: green;
+}
+textarea.notinvalid:-moz-ui-invalid {
+ background-color: red;
+}
+
+textarea.invalid {
+ background-color: red;
+}
+textarea.invalid:-moz-ui-invalid {
+ background-color: green;
+}
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-customerror.html b/layout/reftests/css-ui-invalid/textarea/textarea-customerror.html
new file mode 100644
index 000000000..ebe0fd968
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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, false);
+ </script>
+ </head>
+ <!-- Test: if textarea has a custom error, it should be affected by :-moz-ui-invalid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='invalid' id='t'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-disabled-fieldset-1.html b/layout/reftests/css-ui-invalid/textarea/textarea-disabled-fieldset-1.html
new file mode 100644
index 000000000..7745264a3
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid
+ pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled>
+ <fieldset>
+ <textarea class='notinvalid' required></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-disabled-fieldset-2.html b/layout/reftests/css-ui-invalid/textarea/textarea-disabled-fieldset-2.html
new file mode 100644
index 000000000..9835295ba
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid
+ 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='notinvalid' required></textarea>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-disabled.html b/layout/reftests/css-ui-invalid/textarea/textarea-disabled.html
new file mode 100644
index 000000000..702c97132
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid' disabled></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-dyn-disabled.html b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-disabled.html
new file mode 100644
index 000000000..6a3fa36aa
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-disabled.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if textarea is disabled and invalid, it is barred from constraint
+ validation and should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function doTest()
+ {
+ var e = document.getElementById('t');
+ e.setCustomValidity('foo');
+ e.disabled = 'true';
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest, false);
+ </script>
+ <body>
+ <textarea class='notinvalid' id='t'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-disabled.html b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-disabled.html
new file mode 100644
index 000000000..954cfa5a4
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-disabled.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: if textarea is not disabled and invalid, it is candidate for
+ constraint validation and should be affected
+ by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function doTest()
+ {
+ var e = document.getElementById('t');
+ e.setCustomValidity('foo');
+ e.removeAttribute('disabled');
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest, false);
+ </script>
+ <body>
+ <textarea class='invalid' id='t' disabled></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-changed.html b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-changed.html
new file mode 100644
index 000000000..2e47cfc13
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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, false);
+ </script>
+ </head>
+ <!-- Test: if textarea is no longer readonly and has it's value changed,
+ it's affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='invalid' id='t' readonly required></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-not-changed.html b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-not-changed.html
new file mode 100644
index 000000000..3f93d55e3
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-not-readonly-not-changed.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, false);
+ </script>
+ </head>
+ <!-- Test: if textarea is no longer readonly, but doesn't have it's value changed,
+ it's not affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid' id='t' readonly required></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-dyn-readonly.html b/layout/reftests/css-ui-invalid/textarea/textarea-dyn-readonly.html
new file mode 100644
index 000000000..fb54a2b14
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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, false);
+ </script>
+ </head>
+ <!-- Test: if textarea is readonly, it is barred from constraint validation
+ and should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid' id='t' required></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-fieldset-legend-ref.html b/layout/reftests/css-ui-invalid/textarea/textarea-fieldset-legend-ref.html
new file mode 100644
index 000000000..8e81d23f1
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid/textarea/textarea-fieldset-legend.html b/layout/reftests/css-ui-invalid/textarea/textarea-fieldset-legend.html
new file mode 100644
index 000000000..8e734af29
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-fieldset-legend.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea has a disabled fieldset ancestor, is in the first
+ legend but has its value not changed, it should not be
+ affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <fieldset disabled>
+ <legend>
+ <textarea class='notinvalid' required></textarea>
+ </legend>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-fieldset-ref.html b/layout/reftests/css-ui-invalid/textarea/textarea-fieldset-ref.html
new file mode 100644
index 000000000..1d01eb043
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid/textarea/textarea-novalidate.html b/layout/reftests/css-ui-invalid/textarea/textarea-novalidate.html
new file mode 100644
index 000000000..66f476ef2
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-novalidate.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body onload="document.getElementById('t').value = '';
+ document.documentElement.className = '';">
+ <form novalidate>
+ <textarea id='t' required class='notinvalid'></textarea>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-readonly.html b/layout/reftests/css-ui-invalid/textarea/textarea-readonly.html
new file mode 100644
index 000000000..0921c62fb
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid' readonly></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-ref.html b/layout/reftests/css-ui-invalid/textarea/textarea-ref.html
new file mode 100644
index 000000000..b370a02a0
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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-invalid/textarea/textarea-required-invalid-changed.html b/layout/reftests/css-ui-invalid/textarea/textarea-required-invalid-changed.html
new file mode 100644
index 000000000..6fa004393
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-required-invalid-changed.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <head>
+ <script>
+ function doTest() {
+ document.getElementById('t').value = '';
+ document.documentElement.className='';
+ }
+ document.addEventListener("MozReftestInvalidate", doTest, false);
+ </script>
+ </head>
+ <!-- Test: if textarea isn't valid and it's value has been changed,
+ it should be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea id='t' class='invalid' required></textarea>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-required-invalid.html b/layout/reftests/css-ui-invalid/textarea/textarea-required-invalid.html
new file mode 100644
index 000000000..26144cecf
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-required-invalid.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea isn't valid but it's value hasn't been changed,
+ it should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid' required></textarea>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-required-valid.html b/layout/reftests/css-ui-invalid/textarea/textarea-required-valid.html
new file mode 100644
index 000000000..be0e95e4c
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/textarea/textarea-required-valid.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: if textarea is valid and not barred from constraint validation,
+ it should not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid' required>foo</textarea>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-valid.html b/layout/reftests/css-ui-invalid/textarea/textarea-valid.html
new file mode 100644
index 000000000..58fe81dce
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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 not be affected by :-moz-ui-invalid pseudo-class. -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='notinvalid'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-ui-invalid/textarea/textarea-withtext-ref.html b/layout/reftests/css-ui-invalid/textarea/textarea-withtext-ref.html
new file mode 100644
index 000000000..a6a2b79cf
--- /dev/null
+++ b/layout/reftests/css-ui-invalid/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>