summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-submit-invalid/input-image
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/css-submit-invalid/input-image')
-rw-r--r--layout/reftests/css-submit-invalid/input-image/add-invalid-element.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/add-submit-control.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/change-type-not-submit-control.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/change-type-submit-control.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred-2.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/dynamic-invalid-not-barred.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/dynamic-invalid.html22
-rw-r--r--layout/reftests/css-submit-invalid/input-image/dynamic-valid.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/invalid-barred-ref.html9
-rw-r--r--layout/reftests/css-submit-invalid/input-image/invalid-ref-2.html8
-rw-r--r--layout/reftests/css-submit-invalid/input-image/invalid-ref-3.html9
-rw-r--r--layout/reftests/css-submit-invalid/input-image/invalid-ref.html8
-rw-r--r--layout/reftests/css-submit-invalid/input-image/reftest.list16
-rw-r--r--layout/reftests/css-submit-invalid/input-image/remove-form.html23
-rw-r--r--layout/reftests/css-submit-invalid/input-image/remove-invalid-element.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/remove-submit-control.html21
-rw-r--r--layout/reftests/css-submit-invalid/input-image/self-invalid.html20
-rw-r--r--layout/reftests/css-submit-invalid/input-image/static-invalid-barred.html14
-rw-r--r--layout/reftests/css-submit-invalid/input-image/static-invalid.html14
-rw-r--r--layout/reftests/css-submit-invalid/input-image/static-valid.html14
-rw-r--r--layout/reftests/css-submit-invalid/input-image/valid-ref-2.html8
-rw-r--r--layout/reftests/css-submit-invalid/input-image/valid-ref-3.html9
-rw-r--r--layout/reftests/css-submit-invalid/input-image/valid-ref-4.html9
-rw-r--r--layout/reftests/css-submit-invalid/input-image/valid-ref.html9
25 files changed, 402 insertions, 0 deletions
diff --git a/layout/reftests/css-submit-invalid/input-image/add-invalid-element.html b/layout/reftests/css-submit-invalid/input-image/add-invalid-element.html
new file mode 100644
index 0000000000..6b697a7db8
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/add-invalid-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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 type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/add-submit-control.html b/layout/reftests/css-submit-invalid/input-image/add-submit-control.html
new file mode 100644
index 0000000000..b6bbc9cc0f
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/add-submit-control.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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='image'>
+ <form>
+ <input required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/change-type-not-submit-control.html b/layout/reftests/css-submit-invalid/input-image/change-type-not-submit-control.html
new file mode 100644
index 0000000000..f9656f6c0b
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/change-type-not-submit-control.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').type = 'text';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input required>
+ <input id='i' type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/change-type-submit-control.html b/layout/reftests/css-submit-invalid/input-image/change-type-submit-control.html
new file mode 100644
index 0000000000..370743bf8d
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/change-type-submit-control.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').type = 'image';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input required>
+ <input id='i'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred-2.html b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred-2.html
new file mode 100644
index 0000000000..86782baf4b
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred-2.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').value = '';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' value='foo' required readonly>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred.html b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred.html
new file mode 100644
index 0000000000..b54b8f123a
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-barred.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-not-barred.html b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-not-barred.html
new file mode 100644
index 0000000000..77fd695269
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid-not-barred.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/dynamic-invalid.html b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid.html
new file mode 100644
index 0000000000..e13a3f1ec6
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/dynamic-invalid.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/dynamic-valid.html b/layout/reftests/css-submit-invalid/input-image/dynamic-valid.html
new file mode 100644
index 0000000000..342efb17dc
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/dynamic-valid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/invalid-barred-ref.html b/layout/reftests/css-submit-invalid/input-image/invalid-barred-ref.html
new file mode 100644
index 0000000000..305b03698f
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/invalid-barred-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input required readonly>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/invalid-ref-2.html b/layout/reftests/css-submit-invalid/input-image/invalid-ref-2.html
new file mode 100644
index 0000000000..dd03dc812f
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/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-submit-invalid/input-image/invalid-ref-3.html b/layout/reftests/css-submit-invalid/input-image/invalid-ref-3.html
new file mode 100644
index 0000000000..8a82bdafaa
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/invalid-ref-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <table id='t'>
+ <tr><td><input required></td></tr>
+ <tr><td><input type='image'></td></tr>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/invalid-ref.html b/layout/reftests/css-submit-invalid/input-image/invalid-ref.html
new file mode 100644
index 0000000000..76d80f6fa4
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/invalid-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input required>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/reftest.list b/layout/reftests/css-submit-invalid/input-image/reftest.list
new file mode 100644
index 0000000000..cfb8df94e4
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/reftest.list
@@ -0,0 +1,16 @@
+== static-valid.html valid-ref.html
+== dynamic-valid.html valid-ref.html
+== static-invalid.html invalid-ref.html
+== dynamic-invalid.html invalid-ref.html
+== dynamic-invalid-barred.html invalid-barred-ref.html
+== dynamic-invalid-barred-2.html invalid-barred-ref.html
+== dynamic-invalid-not-barred.html invalid-ref.html
+== static-invalid-barred.html invalid-barred-ref.html
+== remove-invalid-element.html valid-ref-2.html
+== add-invalid-element.html invalid-ref-2.html
+== add-submit-control.html invalid-ref.html
+== remove-submit-control.html valid-ref-3.html
+== change-type-submit-control.html invalid-ref.html
+== change-type-not-submit-control.html valid-ref-4.html
+== self-invalid.html about:blank
+== remove-form.html invalid-ref-3.html
diff --git a/layout/reftests/css-submit-invalid/input-image/remove-form.html b/layout/reftests/css-submit-invalid/input-image/remove-form.html
new file mode 100644
index 0000000000..628694b8af
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/remove-form.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('t').removeChild(document.forms[0]);
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <table id='t'>
+ <form>
+ <tr><td><input required></td></tr>
+ <tr><td><input type='image'></td></tr>
+ </form>
+ </table>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/remove-invalid-element.html b/layout/reftests/css-submit-invalid/input-image/remove-invalid-element.html
new file mode 100644
index 0000000000..643fd0da87
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/remove-invalid-element.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-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'>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/remove-submit-control.html b/layout/reftests/css-submit-invalid/input-image/remove-submit-control.html
new file mode 100644
index 0000000000..81e7f0cf08
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/remove-submit-control.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.body.appendChild(document.getElementById('i'));
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input required>
+ <input id='i' type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/self-invalid.html b/layout/reftests/css-submit-invalid/input-image/self-invalid.html
new file mode 100644
index 0000000000..76d7a4626d
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/self-invalid.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <head>
+ <style>
+ :invalid { display: none; }
+ </style>
+ </head>
+ <script>
+ function onloadHandler()
+ {
+ document.getElementById('i').setCustomValidity('foo');
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='onloadHandler();'>
+ <form>
+ <input id='i' type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/static-invalid-barred.html b/layout/reftests/css-submit-invalid/input-image/static-invalid-barred.html
new file mode 100644
index 0000000000..b4d68cc260
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/static-invalid-barred.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input required readonly>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/static-invalid.html b/layout/reftests/css-submit-invalid/input-image/static-invalid.html
new file mode 100644
index 0000000000..5bf007b74a
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/static-invalid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input required>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/static-valid.html b/layout/reftests/css-submit-invalid/input-image/static-valid.html
new file mode 100644
index 0000000000..fea6dd8ae3
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/static-valid.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ :-moz-submit-invalid { display: none; }
+ </style>
+ </head>
+ <body>
+ <form>
+ <input value='foo' required>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/valid-ref-2.html b/layout/reftests/css-submit-invalid/input-image/valid-ref-2.html
new file mode 100644
index 0000000000..56c903dc4d
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/valid-ref-2.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input type='image'>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/valid-ref-3.html b/layout/reftests/css-submit-invalid/input-image/valid-ref-3.html
new file mode 100644
index 0000000000..91bf77cc83
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/valid-ref-3.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input required>
+ </form>
+ <input type='image'>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/valid-ref-4.html b/layout/reftests/css-submit-invalid/input-image/valid-ref-4.html
new file mode 100644
index 0000000000..df70b8f346
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/valid-ref-4.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input required>
+ <input>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-submit-invalid/input-image/valid-ref.html b/layout/reftests/css-submit-invalid/input-image/valid-ref.html
new file mode 100644
index 0000000000..634a8c7efa
--- /dev/null
+++ b/layout/reftests/css-submit-invalid/input-image/valid-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <form>
+ <input value='foo' required>
+ <input type='image'>
+ </form>
+ </body>
+</html>