summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-default
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /layout/reftests/css-default
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/css-default')
-rw-r--r--layout/reftests/css-default/reftest.list2
-rw-r--r--layout/reftests/css-default/submit-button/default-multiple-submit-1.html19
-rw-r--r--layout/reftests/css-default/submit-button/default-multiple-submit-2.html18
-rw-r--r--layout/reftests/css-default/submit-button/default-multiple-submit-ref.html9
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-1.html10
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-2.html13
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-3.html13
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-4.html20
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-5.html20
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-6.html20
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-7.html20
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-ref.html6
-rw-r--r--layout/reftests/css-default/submit-button/default-submit-button-style.css2
-rw-r--r--layout/reftests/css-default/submit-button/reftest.list11
14 files changed, 183 insertions, 0 deletions
diff --git a/layout/reftests/css-default/reftest.list b/layout/reftests/css-default/reftest.list
new file mode 100644
index 0000000000..9b5ec048ba
--- /dev/null
+++ b/layout/reftests/css-default/reftest.list
@@ -0,0 +1,2 @@
+# submit button default tests
+include submit-button/reftest.list
diff --git a/layout/reftests/css-default/submit-button/default-multiple-submit-1.html b/layout/reftests/css-default/submit-button/default-multiple-submit-1.html
new file mode 100644
index 0000000000..19c71e3c22
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-multiple-submit-1.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ input { color: green; }
+ input.notdefault:default { color: red; }
+ input.default:not(:default) { color: red; }
+ </style>
+ <body>
+ <form id="one"></form>
+ <input type="submit" form="one" class="default" id="test">
+ <form id="two">
+ <input type="submit" class="notdefault">
+ </form>
+ <script>
+ document.body.offsetWidth;
+ document.getElementById("test").setAttribute("form", "two");
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-multiple-submit-2.html b/layout/reftests/css-default/submit-button/default-multiple-submit-2.html
new file mode 100644
index 0000000000..1fb2289ca6
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-multiple-submit-2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ input { color: green; }
+ input.notdefault:default { color: red; }
+ input.default:not(:default) { color: red; }
+ </style>
+ <body>
+ <input type="submit" form="one" class="notdefault">
+ <form id="one">
+ <input type="submit" class="default">
+ </form>
+ <script>
+ document.body.offsetWidth;
+ document.getElementById("one").id = "two";
+ </script>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-multiple-submit-ref.html b/layout/reftests/css-default/submit-button/default-multiple-submit-ref.html
new file mode 100644
index 0000000000..3d89f8bcd8
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-multiple-submit-ref.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<div>
+ <input type="submit" style="color: green">
+</div>
+<div>
+ <input type="submit" style="color: green">
+</div>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-1.html b/layout/reftests/css-default/submit-button/default-submit-button-1.html
new file mode 100644
index 0000000000..4363ecf9ca
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-1.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: when there is only one submit button, it is the default -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <body>
+ <form>
+ <button type='submit'>submit</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-2.html b/layout/reftests/css-default/submit-button/default-submit-button-2.html
new file mode 100644
index 0000000000..c25cdbb87a
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-2.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: when there is only one submit button and some other buttons,
+ there is a default -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <body>
+ <form>
+ <button type='submit'>submit</button>
+ <button type='reset'>text</button>
+ <button type='reset'>text</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-3.html b/layout/reftests/css-default/submit-button/default-submit-button-3.html
new file mode 100644
index 0000000000..c9c5747a09
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-3.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: when there more thon one submit button and some other buttons,
+ the first submit button is the default -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <body>
+ <form>
+ <button type='submit'>submit</button>
+ <button type='reset'>text</button>
+ <button type='submit'>text</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-4.html b/layout/reftests/css-default/submit-button/default-submit-button-4.html
new file mode 100644
index 0000000000..9ccaf76079
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-4.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: when there is a submit button which is changed,
+ there is no default -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <script type="text/javascript">
+ function onLoadHandler()
+ {
+ document.getElementById('b1').type = "reset";
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="onLoadHandler();">
+ <form>
+ <button type='submit' id='b1'>submit</button>
+ <button type='reset'>text</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-5.html b/layout/reftests/css-default/submit-button/default-submit-button-5.html
new file mode 100644
index 0000000000..1b9f50659a
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-5.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: when there is no submit button and one is added,
+ there is a default submit button -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <script type="text/javascript">
+ function onLoadHandler()
+ {
+ document.getElementById('b1').type = "submit";
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="onLoadHandler();">
+ <form>
+ <button type='submit' id='b1'>submit</button>
+ <button type='reset'>text</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-6.html b/layout/reftests/css-default/submit-button/default-submit-button-6.html
new file mode 100644
index 0000000000..b01952c43e
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-6.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: when there is no submit button and one is added,
+ there is a default submit button -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <script type="text/javascript">
+ function onLoadHandler()
+ {
+ document.getElementById('b1').type = "bad-value";
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="onLoadHandler();">
+ <form>
+ <button type='submit' id='b1'>submit</button>
+ <button type='reset'>text</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-7.html b/layout/reftests/css-default/submit-button/default-submit-button-7.html
new file mode 100644
index 0000000000..85aa374533
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-7.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: when there is no submit button and one is added,
+ there is a default submit button -->
+ <link rel='stylesheet' type='text/css' href='default-submit-button-style.css'>
+ <script type="text/javascript">
+ function onLoadHandler()
+ {
+ document.getElementById('b1').removeAttribute('type');
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="onLoadHandler();">
+ <form>
+ <button type='submit' id='b1'>submit</button>
+ <button type='reset'>text</button>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-ref.html b/layout/reftests/css-default/submit-button/default-submit-button-ref.html
new file mode 100644
index 0000000000..4f890374f9
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <button type="submit">submit</button>
+ </body>
+</html>
diff --git a/layout/reftests/css-default/submit-button/default-submit-button-style.css b/layout/reftests/css-default/submit-button/default-submit-button-style.css
new file mode 100644
index 0000000000..429d6d2274
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/default-submit-button-style.css
@@ -0,0 +1,2 @@
+button { visibility: hidden; }
+button:default { visibility: visible; }
diff --git a/layout/reftests/css-default/submit-button/reftest.list b/layout/reftests/css-default/submit-button/reftest.list
new file mode 100644
index 0000000000..df645e8761
--- /dev/null
+++ b/layout/reftests/css-default/submit-button/reftest.list
@@ -0,0 +1,11 @@
+== default-submit-button-1.html default-submit-button-ref.html
+== default-submit-button-2.html default-submit-button-ref.html
+== default-submit-button-3.html default-submit-button-ref.html
+== default-submit-button-4.html about:blank
+== default-submit-button-5.html default-submit-button-ref.html
+== default-submit-button-6.html default-submit-button-ref.html
+== default-submit-button-7.html default-submit-button-ref.html
+
+== default-multiple-submit-1.html default-multiple-submit-ref.html
+== default-multiple-submit-2.html default-multiple-submit-ref.html
+