summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-required
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-required
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-required')
-rw-r--r--layout/reftests/css-required/css-required-button-element.html7
-rw-r--r--layout/reftests/css-required/css-required-button.html7
-rw-r--r--layout/reftests/css-required/css-required-checkbox-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-checkbox.html7
-rw-r--r--layout/reftests/css-required/css-required-dyn-1.html21
-rw-r--r--layout/reftests/css-required/css-required-dyn-2.html21
-rw-r--r--layout/reftests/css-required/css-required-dyn-3.html20
-rw-r--r--layout/reftests/css-required/css-required-dyn-4.html20
-rw-r--r--layout/reftests/css-required/css-required-dyn-5.html20
-rw-r--r--layout/reftests/css-required/css-required-dyn-6.html20
-rw-r--r--layout/reftests/css-required/css-required-file-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-file.html7
-rw-r--r--layout/reftests/css-required/css-required-hidden.html7
-rw-r--r--layout/reftests/css-required/css-required-image.html7
-rw-r--r--layout/reftests/css-required/css-required-password-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-password.html7
-rw-r--r--layout/reftests/css-required/css-required-radio-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-radio.html7
-rw-r--r--layout/reftests/css-required/css-required-reset.html7
-rw-r--r--layout/reftests/css-required/css-required-search-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-search.html7
-rw-r--r--layout/reftests/css-required/css-required-select-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-select.html7
-rw-r--r--layout/reftests/css-required/css-required-style-2.css13
-rw-r--r--layout/reftests/css-required/css-required-style.css13
-rw-r--r--layout/reftests/css-required/css-required-submit.html7
-rw-r--r--layout/reftests/css-required/css-required-tel-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-tel.html7
-rw-r--r--layout/reftests/css-required/css-required-text-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-text.html7
-rw-r--r--layout/reftests/css-required/css-required-textarea-ref.html6
-rw-r--r--layout/reftests/css-required/css-required-textarea.html7
-rw-r--r--layout/reftests/css-required/reftest-stylo.list30
-rw-r--r--layout/reftests/css-required/reftest.list29
34 files changed, 366 insertions, 0 deletions
diff --git a/layout/reftests/css-required/css-required-button-element.html b/layout/reftests/css-required/css-required-button-element.html
new file mode 100644
index 000000000..5c2df1c95
--- /dev/null
+++ b/layout/reftests/css-required/css-required-button-element.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <button required></button>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-button.html b/layout/reftests/css-required/css-required-button.html
new file mode 100644
index 000000000..c31dc169e
--- /dev/null
+++ b/layout/reftests/css-required/css-required-button.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="button" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-checkbox-ref.html b/layout/reftests/css-required/css-required-checkbox-ref.html
new file mode 100644
index 000000000..57cf905ad
--- /dev/null
+++ b/layout/reftests/css-required/css-required-checkbox-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="checkbox">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-checkbox.html b/layout/reftests/css-required/css-required-checkbox.html
new file mode 100644
index 000000000..6126da914
--- /dev/null
+++ b/layout/reftests/css-required/css-required-checkbox.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="checkbox" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-dyn-1.html b/layout/reftests/css-required/css-required-dyn-1.html
new file mode 100644
index 000000000..666360915
--- /dev/null
+++ b/layout/reftests/css-required/css-required-dyn-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: Change an input element from non-required type
+ to a required type. -->
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+
+ <script type="text/javascript">
+ function changeType()
+ {
+ document.getElementById('i').type = 'text';
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="changeType(); disableReftestWait();">
+ <input type="submit" id="i" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-dyn-2.html b/layout/reftests/css-required/css-required-dyn-2.html
new file mode 100644
index 000000000..f19ae3c1e
--- /dev/null
+++ b/layout/reftests/css-required/css-required-dyn-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: Change an input element from required type
+ to a non-required type. -->
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+
+ <script type="text/javascript">
+ function changeType()
+ {
+ document.getElementById('i').type = 'submit';
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="changeType(); disableReftestWait();">
+ <input type="text" id="i" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-dyn-3.html b/layout/reftests/css-required/css-required-dyn-3.html
new file mode 100644
index 000000000..3cd215976
--- /dev/null
+++ b/layout/reftests/css-required/css-required-dyn-3.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: Add the required attribute to an element to make it required. -->
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+
+ <script type="text/javascript">
+ function addRequired()
+ {
+ document.getElementById('i').required = true;
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="addRequired(); disableReftestWait();">
+ <input type="text" id="i">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-dyn-4.html b/layout/reftests/css-required/css-required-dyn-4.html
new file mode 100644
index 000000000..6ab8a32e3
--- /dev/null
+++ b/layout/reftests/css-required/css-required-dyn-4.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: Remove the required attribute from an element to make it optional. -->
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+
+ <script type="text/javascript">
+ function removeRequired()
+ {
+ document.getElementById('i').removeAttribute('required');
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="removeRequired(); disableReftestWait();">
+ <input type="text" id="i" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-dyn-5.html b/layout/reftests/css-required/css-required-dyn-5.html
new file mode 100644
index 000000000..4f8fb1f3d
--- /dev/null
+++ b/layout/reftests/css-required/css-required-dyn-5.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: Add the required attribute to an element to make it required. -->
+ <link rel='stylesheet' type='text/css' href='css-required-style-2.css'>
+
+ <script type="text/javascript">
+ function addRequired()
+ {
+ document.getElementById('i').required = true;
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="addRequired(); disableReftestWait();">
+ <input type="text" id="i">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-dyn-6.html b/layout/reftests/css-required/css-required-dyn-6.html
new file mode 100644
index 000000000..e6c0eae7f
--- /dev/null
+++ b/layout/reftests/css-required/css-required-dyn-6.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: Remove the required attribute from an element to make it optional. -->
+ <link rel='stylesheet' type='text/css' href='css-required-style-2.css'>
+
+ <script type="text/javascript">
+ function removeRequired()
+ {
+ document.getElementById('i').removeAttribute('required');
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="removeRequired(); disableReftestWait();">
+ <input type="text" id="i" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-file-ref.html b/layout/reftests/css-required/css-required-file-ref.html
new file mode 100644
index 000000000..2c4ef0599
--- /dev/null
+++ b/layout/reftests/css-required/css-required-file-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="file">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-file.html b/layout/reftests/css-required/css-required-file.html
new file mode 100644
index 000000000..7a8534ba8
--- /dev/null
+++ b/layout/reftests/css-required/css-required-file.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="file" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-hidden.html b/layout/reftests/css-required/css-required-hidden.html
new file mode 100644
index 000000000..4ad39a518
--- /dev/null
+++ b/layout/reftests/css-required/css-required-hidden.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="hidden" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-image.html b/layout/reftests/css-required/css-required-image.html
new file mode 100644
index 000000000..a293ed0ae
--- /dev/null
+++ b/layout/reftests/css-required/css-required-image.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="image" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-password-ref.html b/layout/reftests/css-required/css-required-password-ref.html
new file mode 100644
index 000000000..cc49928f6
--- /dev/null
+++ b/layout/reftests/css-required/css-required-password-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="password">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-password.html b/layout/reftests/css-required/css-required-password.html
new file mode 100644
index 000000000..27db40342
--- /dev/null
+++ b/layout/reftests/css-required/css-required-password.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="password" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-radio-ref.html b/layout/reftests/css-required/css-required-radio-ref.html
new file mode 100644
index 000000000..e7b97476c
--- /dev/null
+++ b/layout/reftests/css-required/css-required-radio-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="radio">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-radio.html b/layout/reftests/css-required/css-required-radio.html
new file mode 100644
index 000000000..bd5d980f3
--- /dev/null
+++ b/layout/reftests/css-required/css-required-radio.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="radio" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-reset.html b/layout/reftests/css-required/css-required-reset.html
new file mode 100644
index 000000000..a94efef7a
--- /dev/null
+++ b/layout/reftests/css-required/css-required-reset.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="reset" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-search-ref.html b/layout/reftests/css-required/css-required-search-ref.html
new file mode 100644
index 000000000..059b11589
--- /dev/null
+++ b/layout/reftests/css-required/css-required-search-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="search">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-search.html b/layout/reftests/css-required/css-required-search.html
new file mode 100644
index 000000000..0f90cd1d9
--- /dev/null
+++ b/layout/reftests/css-required/css-required-search.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="search" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-select-ref.html b/layout/reftests/css-required/css-required-select-ref.html
new file mode 100644
index 000000000..e419bb184
--- /dev/null
+++ b/layout/reftests/css-required/css-required-select-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <select></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-select.html b/layout/reftests/css-required/css-required-select.html
new file mode 100644
index 000000000..c69f26a3d
--- /dev/null
+++ b/layout/reftests/css-required/css-required-select.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <select required></select>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-style-2.css b/layout/reftests/css-required/css-required-style-2.css
new file mode 100644
index 000000000..0670fb48e
--- /dev/null
+++ b/layout/reftests/css-required/css-required-style-2.css
@@ -0,0 +1,13 @@
+input, textarea, select, button,
+*:optional {
+ visibility: hidden;
+}
+
+input[required]:required {
+ visibility: visible;
+}
+
+/* Override the default style. */
+:invalid {
+ box-shadow: none;
+}
diff --git a/layout/reftests/css-required/css-required-style.css b/layout/reftests/css-required/css-required-style.css
new file mode 100644
index 000000000..59daf2ea6
--- /dev/null
+++ b/layout/reftests/css-required/css-required-style.css
@@ -0,0 +1,13 @@
+input, textarea, select, button,
+*:optional {
+ visibility: hidden;
+}
+
+*:required {
+ visibility: visible;
+}
+
+/* Override the default style. */
+:invalid {
+ box-shadow: none;
+}
diff --git a/layout/reftests/css-required/css-required-submit.html b/layout/reftests/css-required/css-required-submit.html
new file mode 100644
index 000000000..c82fa3ad5
--- /dev/null
+++ b/layout/reftests/css-required/css-required-submit.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="submit" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-tel-ref.html b/layout/reftests/css-required/css-required-tel-ref.html
new file mode 100644
index 000000000..059b11589
--- /dev/null
+++ b/layout/reftests/css-required/css-required-tel-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="search">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-tel.html b/layout/reftests/css-required/css-required-tel.html
new file mode 100644
index 000000000..d468c867c
--- /dev/null
+++ b/layout/reftests/css-required/css-required-tel.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="tel" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-text-ref.html b/layout/reftests/css-required/css-required-text-ref.html
new file mode 100644
index 000000000..07e5eee7e
--- /dev/null
+++ b/layout/reftests/css-required/css-required-text-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="text">
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-text.html b/layout/reftests/css-required/css-required-text.html
new file mode 100644
index 000000000..0aa218033
--- /dev/null
+++ b/layout/reftests/css-required/css-required-text.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <input type="text" required>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-textarea-ref.html b/layout/reftests/css-required/css-required-textarea-ref.html
new file mode 100644
index 000000000..bde6f508f
--- /dev/null
+++ b/layout/reftests/css-required/css-required-textarea-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/css-required-textarea.html b/layout/reftests/css-required/css-required-textarea.html
new file mode 100644
index 000000000..82d01bc5d
--- /dev/null
+++ b/layout/reftests/css-required/css-required-textarea.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='css-required-style.css'>
+ <body>
+ <textarea required></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-required/reftest-stylo.list b/layout/reftests/css-required/reftest-stylo.list
new file mode 100644
index 000000000..8574a5403
--- /dev/null
+++ b/layout/reftests/css-required/reftest-stylo.list
@@ -0,0 +1,30 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+# Checking if these types/elements support :required
+# == css-required-textarea.html css-required-textarea.html
+== css-required-radio.html css-required-radio.html
+== css-required-text.html css-required-text.html
+== css-required-checkbox.html css-required-checkbox.html
+== css-required-file.html css-required-file.html
+== css-required-password.html css-required-password.html
+== css-required-tel.html css-required-tel.html
+== css-required-search.html css-required-search.html
+== css-required-select.html css-required-select.html
+
+# Checking dynamic behavior with <input type='text'>
+== css-required-dyn-1.html css-required-dyn-1.html
+== css-required-dyn-2.html css-required-dyn-2.html
+== css-required-dyn-3.html css-required-dyn-3.html
+== css-required-dyn-4.html css-required-dyn-4.html
+== css-required-dyn-5.html css-required-dyn-5.html
+== css-required-dyn-6.html css-required-dyn-6.html
+
+# Following input types do not support :required
+== css-required-hidden.html css-required-hidden.html
+== css-required-button.html css-required-button.html
+== css-required-submit.html css-required-submit.html
+== css-required-image.html css-required-image.html
+== css-required-reset.html css-required-reset.html
+
+# Following elements can be optional but can't be required
+== css-required-button-element.html css-required-button-element.html
+
diff --git a/layout/reftests/css-required/reftest.list b/layout/reftests/css-required/reftest.list
new file mode 100644
index 000000000..cd5943920
--- /dev/null
+++ b/layout/reftests/css-required/reftest.list
@@ -0,0 +1,29 @@
+# Checking if these types/elements support :required
+== css-required-textarea.html css-required-textarea-ref.html
+== css-required-radio.html css-required-radio-ref.html
+== css-required-text.html css-required-text-ref.html
+== css-required-checkbox.html css-required-checkbox-ref.html
+== css-required-file.html css-required-file-ref.html
+== css-required-password.html css-required-password-ref.html
+== css-required-tel.html css-required-tel-ref.html
+== css-required-search.html css-required-search-ref.html
+== css-required-select.html css-required-select-ref.html
+
+# Checking dynamic behavior with <input type='text'>
+== css-required-dyn-1.html css-required-text-ref.html
+== css-required-dyn-2.html about:blank
+== css-required-dyn-3.html css-required-text-ref.html
+== css-required-dyn-4.html about:blank
+== css-required-dyn-5.html css-required-text-ref.html
+== css-required-dyn-6.html about:blank
+
+# Following input types do not support :required
+== css-required-hidden.html about:blank
+== css-required-button.html about:blank
+== css-required-submit.html about:blank
+== css-required-image.html about:blank
+== css-required-reset.html about:blank
+
+# Following elements can be optional but can't be required
+== css-required-button-element.html about:blank
+