summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-invalid/fieldset
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/fieldset
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/fieldset')
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-invalid-barred.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element-dynamic.html21
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-invalid-with-valid-element.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-valid-element.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-invalid-element.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-no-element.html21
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-div-invalid.html17
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-barred.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-not-barred.html20
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid.html21
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-dynamic-valid.html21
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-barred.html23
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-invalid.html23
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred.html15
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-invalid.html12
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-is-barred.html11
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-nested-barred-ref.html11
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-nested-barred.html24
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-nested-invalid.html17
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid-ref.html22
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid.html21
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-remove-invalid-element.html21
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-static-invalid-barred.html13
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-static-invalid.html14
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-static-valid.html14
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred-remove-barred.html23
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred.html15
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-valid.html14
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-with-invalid-element-add-barred-dynamic.html23
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-with-valid-and-invalid.html15
-rw-r--r--layout/reftests/css-invalid/fieldset/fieldset-with-valid-element-add-barred-dynamic.html23
-rw-r--r--layout/reftests/css-invalid/fieldset/reftest-stylo.list30
-rw-r--r--layout/reftests/css-invalid/fieldset/reftest.list29
34 files changed, 666 insertions, 0 deletions
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-barred.html
new file mode 100644
index 000000000..74150b303
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-barred.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!-- fieldset with invalid barred for constraint validation element -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { display: none ;}
+ </style>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ </head>
+ <body onload="onloadHandler();">
+ <input required readonly id="i">
+ <fieldset id="fieldset">
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element-dynamic.html b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element-dynamic.html
new file mode 100644
index 000000000..3485e8806
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element-dynamic.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- fieldset with no elements and invalid element is added dynamically -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display:none }
+ </style>
+ <script>
+ function onLoadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className='';
+ }
+ </script>
+ </head>
+ <body onload='onLoadHandler();'>
+ <input id='i' required>
+ <fieldset id="fieldset">
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element.html b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element.html
new file mode 100644
index 000000000..855a432ce
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--fieldset with one invalid element and another invalid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='email' value='foo'>
+ <fieldset id="fieldset">
+ <input id='j' type='email' value='foo'>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-with-valid-element.html b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-with-valid-element.html
new file mode 100644
index 000000000..ab62debd3
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-invalid-with-valid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--fieldset with one valid element and invalid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='email' value='bar'>
+ <fieldset id="fieldset">
+ <input id='j' type='text' value='foo'>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-valid-element.html b/layout/reftests/css-invalid/fieldset/fieldset-add-valid-element.html
new file mode 100644
index 000000000..6e5363d6b
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-valid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--fieldset with one valid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='text' value='bar'>
+ <fieldset id="fieldset">
+ <input id='j' type='text' value='foo'>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-invalid-element.html b/layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-invalid-element.html
new file mode 100644
index 000000000..4157831e6
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-invalid-element.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!--fieldset with one invalid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='text' value='foo'>
+ <fieldset id="fieldset">
+ <input id='j' type='email' value='emailfoo'>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-no-element.html b/layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-no-element.html
new file mode 100644
index 000000000..bfdf264af
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-add-valid-with-no-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!--fieldset with no valid element and another valid one is added dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <input id='i' type='text' value='foo'>
+ <fieldset id="fieldset">
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-div-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-div-invalid.html
new file mode 100644
index 000000000..2c1b47b78
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-div-invalid.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<!-- fieldset with input in div should become invalid -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display: none ;}
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ <div>
+ <input required value="">
+ </div>
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-barred.html
new file mode 100644
index 000000000..267199407
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-barred.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element and dynamically made it element with
+barred constraints -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').readOnly = true;
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input id='i' required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-not-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-not-barred.html
new file mode 100644
index 000000000..cf7905f0c
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid-not-barred.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').readOnly = false;
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input id='i' required readonly>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid.html
new file mode 100644
index 000000000..c40a920cd
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element which is made invalid dynamically -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').value = '';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input id='i' value='foo' required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-dynamic-valid.html b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-valid.html
new file mode 100644
index 000000000..bfa266015
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-dynamic-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- fieldset with one valid element which is made valid dynamically -->
+<html>
+ <head>
+ <style>
+ fieldset:valid {display: none;}
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').value = 'foo';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload="onloadHandler();">
+ <fieldset id="fieldset">
+ <input id='i' required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-barred.html
new file mode 100644
index 000000000..c750a3845
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-barred.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element and a barred for constraint
+validation element then you remove the second element -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").removeChild(document.getElementById('j'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input required>
+ <input id='j' value='foo' readonly>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-invalid.html
new file mode 100644
index 000000000..2bc2b2bb1
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred-remove-invalid.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element and a barred for constraint
+validation element then you remove the second element -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").removeChild(document.getElementById('j'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input id='j' required>
+ <input value='foo' readonly>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred.html
new file mode 100644
index 000000000..807555072
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-invalid-and-barred.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element and a barred for constraint validation element -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <fieldset id="fieldset">
+ <input required>
+ <input id='i' value='foo' readonly required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-invalid.html
new file mode 100644
index 000000000..8f10b70e0
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-invalid.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<!-- Invalid fieldset -->
+<style>
+ fieldset:invalid { display: none; }
+</style>
+<body onload="document.getElementById('input').setCustomValidity('foo'); document.documentElement.className='';">
+<fieldset>
+ <input id="input">
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-is-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-is-barred.html
new file mode 100644
index 000000000..ed104497b
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-is-barred.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<!-- Fieldset is barred -->
+<style>
+ fieldset:valid { display: none; }
+</style>
+<body onload="document.getElementById('f').setCustomValidity('foo'); document.documentElement.className='';">
+<fieldset id="f">
+</fieldset>
+</body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-nested-barred-ref.html b/layout/reftests/css-invalid/fieldset/fieldset-nested-barred-ref.html
new file mode 100644
index 000000000..bd8b9a671
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-nested-barred-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<!-- Reference for input in nested fieldset becomes barred -->
+<html>
+ <body>
+ <fieldset style="background-color: green;">
+ <fieldset style="background-color: green;">
+ <input id='i' required readonly>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-nested-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-nested-barred.html
new file mode 100644
index 000000000..fea0c79ae
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-nested-barred.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<!-- input in nested fieldset becomes barred -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { background-color: green; }
+ fieldset:invalid { background-color: red; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').readOnly = true;
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset>
+ <fieldset>
+ <input id='i' required>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-nested-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-nested-invalid.html
new file mode 100644
index 000000000..ba266bf81
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-nested-invalid.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<!-- Nested fieldsets should all become invalid -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display: none ;}
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ <fieldset>
+ <input required value="">
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid-ref.html b/layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid-ref.html
new file mode 100644
index 000000000..4f8e399b6
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid-ref.html
@@ -0,0 +1,22 @@
+
+<!DOCTYPE html>
+<!-- Nested fieldsets should be assigned validation correctly -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { background-color: green; }
+ fieldset:invalid { background-color: red; }
+ </style>
+ </head>
+ <body>
+ <fieldset style="background-color:red;">
+ <fieldset style="background-color: green;">
+ <input>
+ </fieldset>
+ <fieldset style="background-color: red">
+ <input required>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid.html
new file mode 100644
index 000000000..8f6973007
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-nested-valid-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- Nested fieldsets should be assigned validation correctly -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { background-color: green; }
+ fieldset:invalid { background-color: red; }
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ <fieldset>
+ <input>
+ </fieldset>
+ <fieldset>
+ <input required>
+ </fieldset>
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-remove-invalid-element.html b/layout/reftests/css-invalid/fieldset/fieldset-remove-invalid-element.html
new file mode 100644
index 000000000..7df987c9b
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-remove-invalid-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element and the element is dynamically removed -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").removeChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input id='i' type='email' value='foo'>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-static-invalid-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-static-invalid-barred.html
new file mode 100644
index 000000000..c2bf3db34
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-static-invalid-barred.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <body>
+ <fieldset id="fieldset">
+ <input required readonly>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-static-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-static-invalid.html
new file mode 100644
index 000000000..613286ec2
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-static-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<!--fieldset with only invalid elements -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <fieldset id="fieldset">
+ <input required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-static-valid.html b/layout/reftests/css-invalid/fieldset/fieldset-static-valid.html
new file mode 100644
index 000000000..590b7d30b
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-static-valid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<!-- fieldset with only valid elements -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <body>
+ <fieldset id="fieldset">
+ <input value='foo' required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred-remove-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred-remove-barred.html
new file mode 100644
index 000000000..06d715f9e
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred-remove-barred.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- fieldset with one valid element and a barred for constraint
+validation element then you remove the second element -->
+<html class='reftest-wait'>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById("fieldset").removeChild(document.getElementById('j'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <fieldset id="fieldset">
+ <input id='i' value='foo' required>
+ <input id='j' value='bar' readonly>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred.html b/layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred.html
new file mode 100644
index 000000000..61f21f7e3
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-valid-and-barred.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- fieldset with one invalid element and a barred for constraint validation element -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { display: none; }
+ </style>
+ </head>
+ <body>
+ <fieldset id="fieldset">
+ <input id='i' value='bar' required>
+ <input id='i' value='foo' readonly required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-valid.html b/layout/reftests/css-invalid/fieldset/fieldset-valid.html
new file mode 100644
index 000000000..59e31af10
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-valid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<!-- Valid fieldset. -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { display: none ;}
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ </fieldset>
+ </body>
+</html>
+
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-with-invalid-element-add-barred-dynamic.html b/layout/reftests/css-invalid/fieldset/fieldset-with-invalid-element-add-barred-dynamic.html
new file mode 100644
index 000000000..30fd521e4
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-with-invalid-element-add-barred-dynamic.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- fieldset with one valid element and you dynamically add a barred constraint
+validation element -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display:none }
+ </style>
+ <script>
+ function onLoadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className='';
+ }
+ </script>
+ </head>
+ <body onload='onLoadHandler();'>
+ <input id='i' value='foo' readonly>
+ <fieldset id="fieldset">
+ <input required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-with-valid-and-invalid.html b/layout/reftests/css-invalid/fieldset/fieldset-with-valid-and-invalid.html
new file mode 100644
index 000000000..9a9d43a39
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-with-valid-and-invalid.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<!-- fieldset with invalid and valid elements -->
+<html>
+ <head>
+ <style>
+ fieldset:invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <fieldset>
+ <input id='i' value='foo'>
+ <input required>
+ <fieldset/>
+ <body>
+<html>
diff --git a/layout/reftests/css-invalid/fieldset/fieldset-with-valid-element-add-barred-dynamic.html b/layout/reftests/css-invalid/fieldset/fieldset-with-valid-element-add-barred-dynamic.html
new file mode 100644
index 000000000..3c1e8a3f9
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/fieldset-with-valid-element-add-barred-dynamic.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!-- fieldset with one valid element and you dynamically add a barred constraint
+validation element -->
+<html>
+ <head>
+ <style>
+ fieldset:valid { display:none }
+ </style>
+ <script>
+ function onLoadHandler()
+ {
+ document.getElementById("fieldset").appendChild(document.getElementById('i'));
+ document.documentElement.className='';
+ }
+ </script>
+ </head>
+ <body onload='onLoadHandler();'>
+ <input id='i' value='foo' readonly>
+ <fieldset id="fieldset" id="fieldset">
+ <input id='j' value='bar' required>
+ </fieldset>
+ </body>
+</html>
diff --git a/layout/reftests/css-invalid/fieldset/reftest-stylo.list b/layout/reftests/css-invalid/fieldset/reftest-stylo.list
new file mode 100644
index 000000000..24abf4c4a
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/reftest-stylo.list
@@ -0,0 +1,30 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== fieldset-valid.html fieldset-valid.html
+== fieldset-invalid.html fieldset-invalid.html
+== fieldset-add-invalid-barred.html fieldset-add-invalid-barred.html
+== fieldset-add-invalid-element-dynamic.html fieldset-add-invalid-element-dynamic.html
+== fieldset-add-invalid-element.html fieldset-add-invalid-element.html
+== fieldset-add-invalid-with-valid-element.html fieldset-add-invalid-with-valid-element.html
+== fieldset-add-valid-element.html fieldset-add-valid-element.html
+== fieldset-add-valid-with-invalid-element.html fieldset-add-valid-with-invalid-element.html
+== fieldset-add-valid-with-no-element.html fieldset-add-valid-with-no-element.html
+== fieldset-dynamic-invalid-barred.html fieldset-dynamic-invalid-barred.html
+== fieldset-dynamic-invalid-not-barred.html fieldset-dynamic-invalid-not-barred.html
+== fieldset-dynamic-invalid.html fieldset-dynamic-invalid.html
+== fieldset-dynamic-valid.html fieldset-dynamic-valid.html
+== fieldset-invalid-and-barred-remove-barred.html fieldset-invalid-and-barred-remove-barred.html
+== fieldset-invalid-and-barred-remove-invalid.html fieldset-invalid-and-barred-remove-invalid.html
+== fieldset-invalid-and-barred.html fieldset-invalid-and-barred.html
+== fieldset-remove-invalid-element.html fieldset-remove-invalid-element.html
+== fieldset-static-invalid-barred.html fieldset-static-invalid-barred.html
+== fieldset-static-invalid.html fieldset-static-invalid.html
+== fieldset-static-valid.html fieldset-static-valid.html
+== fieldset-valid-and-barred-remove-barred.html fieldset-valid-and-barred-remove-barred.html
+== fieldset-valid-and-barred.html fieldset-valid-and-barred.html
+== fieldset-with-invalid-element-add-barred-dynamic.html fieldset-with-invalid-element-add-barred-dynamic.html
+== fieldset-with-valid-and-invalid.html fieldset-with-valid-and-invalid.html
+== fieldset-with-valid-element-add-barred-dynamic.html fieldset-with-valid-element-add-barred-dynamic.html
+== fieldset-nested-invalid.html fieldset-nested-invalid.html
+== fieldset-div-invalid.html fieldset-div-invalid.html
+== fieldset-nested-valid-invalid.html fieldset-nested-valid-invalid.html
+fails fuzzy-if(skiaContent,1,5) == fieldset-nested-barred.html fieldset-nested-barred.html
diff --git a/layout/reftests/css-invalid/fieldset/reftest.list b/layout/reftests/css-invalid/fieldset/reftest.list
new file mode 100644
index 000000000..954732bb3
--- /dev/null
+++ b/layout/reftests/css-invalid/fieldset/reftest.list
@@ -0,0 +1,29 @@
+== fieldset-valid.html about:blank
+== fieldset-invalid.html about:blank
+== fieldset-add-invalid-barred.html about:blank
+== fieldset-add-invalid-element-dynamic.html about:blank
+== fieldset-add-invalid-element.html about:blank
+== fieldset-add-invalid-with-valid-element.html about:blank
+== fieldset-add-valid-element.html about:blank
+== fieldset-add-valid-with-invalid-element.html about:blank
+== fieldset-add-valid-with-no-element.html about:blank
+== fieldset-dynamic-invalid-barred.html about:blank
+== fieldset-dynamic-invalid-not-barred.html about:blank
+== fieldset-dynamic-invalid.html about:blank
+== fieldset-dynamic-valid.html about:blank
+== fieldset-invalid-and-barred-remove-barred.html about:blank
+== fieldset-invalid-and-barred-remove-invalid.html about:blank
+== fieldset-invalid-and-barred.html about:blank
+== fieldset-remove-invalid-element.html about:blank
+== fieldset-static-invalid-barred.html about:blank
+== fieldset-static-invalid.html about:blank
+== fieldset-static-valid.html about:blank
+== fieldset-valid-and-barred-remove-barred.html about:blank
+== fieldset-valid-and-barred.html about:blank
+== fieldset-with-invalid-element-add-barred-dynamic.html about:blank
+== fieldset-with-valid-and-invalid.html about:blank
+== fieldset-with-valid-element-add-barred-dynamic.html about:blank
+== fieldset-nested-invalid.html about:blank
+== fieldset-div-invalid.html about:blank
+== fieldset-nested-valid-invalid.html fieldset-nested-valid-invalid-ref.html
+fuzzy-if(skiaContent,1,5) == fieldset-nested-barred.html fieldset-nested-barred-ref.html