summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-invalid/form
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-invalid/form
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-invalid/form')
-rw-r--r--layout/reftests/css-invalid/form/form-add-control.html22
-rw-r--r--layout/reftests/css-invalid/form/form-add-invalid-element-dynamic.html21
-rw-r--r--layout/reftests/css-invalid/form/form-add-invalid-element.html22
-rw-r--r--layout/reftests/css-invalid/form/form-add-invalid-with-valid-element.html22
-rw-r--r--layout/reftests/css-invalid/form/form-add-valid-element.html22
-rw-r--r--layout/reftests/css-invalid/form/form-add-valid-with-invalid-element.html22
-rw-r--r--layout/reftests/css-invalid/form/form-add-valid-with-no-element.html21
-rw-r--r--layout/reftests/css-invalid/form/form-dynamic-invalid-barred.html22
-rw-r--r--layout/reftests/css-invalid/form/form-dynamic-invalid-not-barred.html20
-rw-r--r--layout/reftests/css-invalid/form/form-dynamic-invalid.html22
-rw-r--r--layout/reftests/css-invalid/form/form-dynamic-valid.html21
-rw-r--r--layout/reftests/css-invalid/form/form-invalid-and-barred-remove-barred.html23
-rw-r--r--layout/reftests/css-invalid/form/form-invalid-and-barred.html15
-rw-r--r--layout/reftests/css-invalid/form/form-invalid-barred-ref.html8
-rw-r--r--layout/reftests/css-invalid/form/form-invalid-barred.html15
-rw-r--r--layout/reftests/css-invalid/form/form-invalid-ref-2.html8
-rw-r--r--layout/reftests/css-invalid/form/form-invalid-ref.html5
-rw-r--r--layout/reftests/css-invalid/form/form-remove-invalid-element.html21
-rw-r--r--layout/reftests/css-invalid/form/form-static-invalid-barred.html13
-rw-r--r--layout/reftests/css-invalid/form/form-static-invalid.html14
-rw-r--r--layout/reftests/css-invalid/form/form-static-valid.html14
-rw-r--r--layout/reftests/css-invalid/form/form-valid-and-barred-ref.html9
-rw-r--r--layout/reftests/css-invalid/form/form-valid-and-barred-remove-barred.html23
-rw-r--r--layout/reftests/css-invalid/form/form-valid-and-barred.html15
-rw-r--r--layout/reftests/css-invalid/form/form-valid-ref-2.html7
-rw-r--r--layout/reftests/css-invalid/form/form-valid-ref-4.html9
-rw-r--r--layout/reftests/css-invalid/form/form-valid-ref.html8
-rw-r--r--layout/reftests/css-invalid/form/form-with-invalid-element-add-barred-dynamic.html23
-rw-r--r--layout/reftests/css-invalid/form/form-with-valid-and-invalid.html15
-rw-r--r--layout/reftests/css-invalid/form/form-with-valid-element-add-barred-dynamic.html23
-rw-r--r--layout/reftests/css-invalid/form/reftest-stylo.list25
-rw-r--r--layout/reftests/css-invalid/form/reftest.list24
32 files changed, 554 insertions, 0 deletions
diff --git a/layout/reftests/css-invalid/form/form-add-control.html b/layout/reftests/css-invalid/form/form-add-control.html
new file mode 100644
index 000000000..07d33ba16
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-control.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--form with one invalid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i'>
+ <form>
+ <input required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-add-invalid-element-dynamic.html b/layout/reftests/css-invalid/form/form-add-invalid-element-dynamic.html
new file mode 100644
index 000000000..29bb4ad30
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-invalid-element-dynamic.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- form with no elements and invalid element is added dynamically -->
+<html>
+ <head>
+ <style>
+ form:invalid { display:none }
+ </style>
+ <script>
+ function onLoadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className='';
+ }
+ </script>
+ </head>
+ <body onload='onLoadHandler();'>
+ <input id='i' required>
+ <form>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-add-invalid-element.html b/layout/reftests/css-invalid/form/form-add-invalid-element.html
new file mode 100644
index 000000000..9f6017cd6
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-invalid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--form with one invalid element and another invalid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='email' value='foo'>
+ <form>
+ <input id='j' type='email' value='foo'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-add-invalid-with-valid-element.html b/layout/reftests/css-invalid/form/form-add-invalid-with-valid-element.html
new file mode 100644
index 000000000..1260e3f95
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-invalid-with-valid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--form with one valid element and invalid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='email' value='bar'>
+ <form>
+ <input id='j' type='text' value='foo'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-add-valid-element.html b/layout/reftests/css-invalid/form/form-add-valid-element.html
new file mode 100644
index 000000000..09bbd0f11
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-valid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--form with one valid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='text' value='bar'>
+ <form>
+ <input id='j' type='text' value='foo'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-add-valid-with-invalid-element.html b/layout/reftests/css-invalid/form/form-add-valid-with-invalid-element.html
new file mode 100644
index 000000000..205897ca0
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-valid-with-invalid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--form with one invalid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='text' value='foo'>
+ <form>
+ <input id='j' type='email' value='emailfoo'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-add-valid-with-no-element.html b/layout/reftests/css-invalid/form/form-add-valid-with-no-element.html
new file mode 100644
index 000000000..1c2632fbc
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-add-valid-with-no-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!--form with no valid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='text' value='foo'>
+ <form>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-dynamic-invalid-barred.html b/layout/reftests/css-invalid/form/form-dynamic-invalid-barred.html
new file mode 100644
index 000000000..ff110054b
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-dynamic-invalid-barred.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!-- form with one invalid element and dynamically made it element with
+barred constraints -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').readOnly = 'ro';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-dynamic-invalid-not-barred.html b/layout/reftests/css-invalid/form/form-dynamic-invalid-not-barred.html
new file mode 100644
index 000000000..f38ff854e
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-dynamic-invalid-not-barred.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').removeAttribute('readonly');
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' required readonly>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-dynamic-invalid.html b/layout/reftests/css-invalid/form/form-dynamic-invalid.html
new file mode 100644
index 000000000..6e189b4c5
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-dynamic-invalid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!-- form with one invalid element which is made invalid dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ :-moz-ui-invalid { box-shadow: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').value = '';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' value='foo' required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-dynamic-valid.html b/layout/reftests/css-invalid/form/form-dynamic-valid.html
new file mode 100644
index 000000000..d8bb2a90f
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-dynamic-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- form with one valid element which is made valid dynamically -->
+<html>
+ <head>
+ <style>
+ form:invalid {display: none;}
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').value = 'foo';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <form>
+ <input id='i' required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-invalid-and-barred-remove-barred.html b/layout/reftests/css-invalid/form/form-invalid-and-barred-remove-barred.html
new file mode 100644
index 000000000..62e24162f
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-invalid-and-barred-remove-barred.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- form with one invalid element and a barred for constraint
+validation element then you remove the second element -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].removeChild(document.getElementById('j'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input required>
+ <input id='j' value='foo' readonly>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-invalid-and-barred.html b/layout/reftests/css-invalid/form/form-invalid-and-barred.html
new file mode 100644
index 000000000..0d4391be3
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-invalid-and-barred.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- Form with one invalid element and a barred for constraint validation element -->
+<html>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input required>
+ <input id='i' value='foo' readonly required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-invalid-barred-ref.html b/layout/reftests/css-invalid/form/form-invalid-barred-ref.html
new file mode 100644
index 000000000..d9ba4a84c
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-invalid-barred-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input required readonly>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-invalid-barred.html b/layout/reftests/css-invalid/form/form-invalid-barred.html
new file mode 100644
index 000000000..8509352a5
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-invalid-barred.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- form with invalid barred for constraint validation element -->
+<html>
+ <head>
+ <style>
+ form:invalid { display: none ;}
+ </style>
+ </head>
+ <body>
+ <form>
+ <input required readonly>
+ </form>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/form/form-invalid-ref-2.html b/layout/reftests/css-invalid/form/form-invalid-ref-2.html
new file mode 100644
index 000000000..dd03dc812
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-invalid-ref-2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input type='email' value='foo'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-invalid-ref.html b/layout/reftests/css-invalid/form/form-invalid-ref.html
new file mode 100644
index 000000000..d1d41176c
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-invalid-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-remove-invalid-element.html b/layout/reftests/css-invalid/form/form-remove-invalid-element.html
new file mode 100644
index 000000000..5a75a4c3d
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-remove-invalid-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- form with one invalid element and the element is dynamically removed -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].removeChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' type='email' value='foo'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-static-invalid-barred.html b/layout/reftests/css-invalid/form/form-static-invalid-barred.html
new file mode 100644
index 000000000..fd1fb016d
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-static-invalid-barred.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input required readonly>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-static-invalid.html b/layout/reftests/css-invalid/form/form-static-invalid.html
new file mode 100644
index 000000000..aea413e49
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-static-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<!--form with only invalid elements -->
+<html>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-static-valid.html b/layout/reftests/css-invalid/form/form-static-valid.html
new file mode 100644
index 000000000..b2104bacd
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-static-valid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<!-- form with only valid elements -->
+<html>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input value='foo' required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-valid-and-barred-ref.html b/layout/reftests/css-invalid/form/form-valid-and-barred-ref.html
new file mode 100644
index 000000000..a0dd9e358
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-valid-and-barred-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input value='bar' required>
+ <input value='foo' readonly required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-valid-and-barred-remove-barred.html b/layout/reftests/css-invalid/form/form-valid-and-barred-remove-barred.html
new file mode 100644
index 000000000..dd63b8c5c
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-valid-and-barred-remove-barred.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- form with one valid element and a barred for constraint
+validation element then you remove the second element -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.forms[0].removeChild(document.getElementById('j'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' value='foo'required>
+ <input id='j' value='bar' readonly>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-valid-and-barred.html b/layout/reftests/css-invalid/form/form-valid-and-barred.html
new file mode 100644
index 000000000..3cface5e6
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-valid-and-barred.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- Form with one invalid element and a barred for constraint validation element -->
+<html>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input id='i' value='bar'required>
+ <input id='i' value='foo' readonly required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-valid-ref-2.html b/layout/reftests/css-invalid/form/form-valid-ref-2.html
new file mode 100644
index 000000000..47698f1d9
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-valid-ref-2.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-valid-ref-4.html b/layout/reftests/css-invalid/form/form-valid-ref-4.html
new file mode 100644
index 000000000..881c5cab8
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-valid-ref-4.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input type='text' value='foo'>
+ <input type='text' value='bar'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-valid-ref.html b/layout/reftests/css-invalid/form/form-valid-ref.html
new file mode 100644
index 000000000..e210a812e
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-valid-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input type='text' value='foo' required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-with-invalid-element-add-barred-dynamic.html b/layout/reftests/css-invalid/form/form-with-invalid-element-add-barred-dynamic.html
new file mode 100644
index 000000000..893af3e5c
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-with-invalid-element-add-barred-dynamic.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- form with one valid element and you dynamically add a barred constraint
+validation element -->
+<html>
+ <head>
+ <style>
+ form:invalid { display:none }
+ </style>
+ <script>
+ function onLoadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className='';
+ }
+ </script>
+ </head>
+ <body onload='onLoadHandler();'>
+ <input id='i' value='foo' readonly>
+ <form>
+ <input required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/form-with-valid-and-invalid.html b/layout/reftests/css-invalid/form/form-with-valid-and-invalid.html
new file mode 100644
index 000000000..b4ed30576
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-with-valid-and-invalid.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- form with invalid and valid elements -->
+<html>
+ <head>
+ <style>
+ form:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input id='i' value='foo'>
+ <input required>
+ <form>
+ <body>
+<html>
diff --git a/layout/reftests/css-invalid/form/form-with-valid-element-add-barred-dynamic.html b/layout/reftests/css-invalid/form/form-with-valid-element-add-barred-dynamic.html
new file mode 100644
index 000000000..c012d2521
--- /dev/null
+++ b/layout/reftests/css-invalid/form/form-with-valid-element-add-barred-dynamic.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- form with one valid element and you dynamically add a barred constraint
+validation element -->
+<html>
+ <head>
+ <style>
+ form:invalid { display:none }
+ </style>
+ <script>
+ function onLoadHandler()
+ {
+ document.forms[0].appendChild(document.getElementById('i'));
+ document.documentElement.className='';
+ }
+ </script>
+ </head>
+ <body onload='onLoadHandler();'>
+ <input id='i' value='foo' readonly>
+ <form>
+ <input id='j' value='bar' required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/form/reftest-stylo.list b/layout/reftests/css-invalid/form/reftest-stylo.list
new file mode 100644
index 000000000..5abbde77b
--- /dev/null
+++ b/layout/reftests/css-invalid/form/reftest-stylo.list
@@ -0,0 +1,25 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== form-static-valid.html form-static-valid.html
+== form-dynamic-valid.html form-dynamic-valid.html
+== form-remove-invalid-element.html form-remove-invalid-element.html
+== form-static-invalid.html form-static-invalid.html
+== form-dynamic-invalid.html form-dynamic-invalid.html
+== form-add-control.html form-add-control.html
+== form-dynamic-invalid-not-barred.html form-dynamic-invalid-not-barred.html
+== form-remove-invalid-element.html form-remove-invalid-element.html
+== form-dynamic-invalid-barred.html form-dynamic-invalid-barred.html
+== form-static-invalid-barred.html form-static-invalid-barred.html
+== form-add-invalid-element.html form-add-invalid-element.html
+== form-add-valid-with-invalid-element.html form-add-valid-with-invalid-element.html
+== form-invalid-barred.html form-invalid-barred.html
+== form-add-valid-element.html form-add-valid-element.html
+== form-add-valid-with-no-element.html form-add-valid-with-no-element.html
+== form-add-invalid-with-valid-element.html form-add-invalid-with-valid-element.html
+== form-with-valid-and-invalid.html form-with-valid-and-invalid.html
+== form-add-invalid-element-dynamic.html form-add-invalid-element-dynamic.html
+== form-invalid-and-barred.html form-invalid-and-barred.html
+== form-invalid-and-barred-remove-barred.html form-invalid-and-barred-remove-barred.html
+== form-valid-and-barred.html form-valid-and-barred.html
+== form-valid-and-barred-remove-barred.html form-valid-and-barred-remove-barred.html
+== form-with-invalid-element-add-barred-dynamic.html form-with-invalid-element-add-barred-dynamic.html
+== form-with-valid-element-add-barred-dynamic.html form-with-valid-element-add-barred-dynamic.html
diff --git a/layout/reftests/css-invalid/form/reftest.list b/layout/reftests/css-invalid/form/reftest.list
new file mode 100644
index 000000000..e218e7d9b
--- /dev/null
+++ b/layout/reftests/css-invalid/form/reftest.list
@@ -0,0 +1,24 @@
+== form-static-valid.html form-valid-ref.html
+== form-dynamic-valid.html form-valid-ref.html
+== form-remove-invalid-element.html form-valid-ref-2.html
+== form-static-invalid.html form-invalid-ref.html
+== form-dynamic-invalid.html form-invalid-ref.html
+== form-add-control.html form-invalid-ref.html
+== form-dynamic-invalid-not-barred.html form-invalid-ref.html
+== form-remove-invalid-element.html form-invalid-ref.html
+== form-dynamic-invalid-barred.html form-invalid-barred-ref.html
+== form-static-invalid-barred.html form-invalid-barred-ref.html
+== form-add-invalid-element.html form-invalid-ref.html
+== form-add-valid-with-invalid-element.html form-invalid-ref.html
+== form-invalid-barred.html form-invalid-barred-ref.html
+== form-add-valid-element.html form-valid-ref-4.html
+== form-add-valid-with-no-element.html form-valid-ref.html
+== form-add-invalid-with-valid-element.html form-invalid-ref.html
+== form-with-valid-and-invalid.html form-invalid-ref.html
+== form-add-invalid-element-dynamic.html form-invalid-ref.html
+== form-invalid-and-barred.html form-invalid-ref.html
+== form-invalid-and-barred-remove-barred.html form-invalid-ref.html
+== form-valid-and-barred.html form-valid-and-barred-ref.html
+== form-valid-and-barred-remove-barred.html form-valid-ref.html
+== form-with-invalid-element-add-barred-dynamic.html form-invalid-ref.html
+== form-with-valid-element-add-barred-dynamic.html form-valid-and-barred-ref.html