summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/input/radio
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /layout/reftests/forms/input/radio
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/forms/input/radio')
-rw-r--r--layout/reftests/forms/input/radio/checked-appearance-none.html2
-rw-r--r--layout/reftests/forms/input/radio/checked-native-notref.html2
-rw-r--r--layout/reftests/forms/input/radio/checked-native.html2
-rw-r--r--layout/reftests/forms/input/radio/gtk-theme-width-height-ref.html31
-rw-r--r--layout/reftests/forms/input/radio/gtk-theme-width-height.html30
-rw-r--r--layout/reftests/forms/input/radio/label-dynamic-ref.html38
-rw-r--r--layout/reftests/forms/input/radio/label-dynamic.html46
-rw-r--r--layout/reftests/forms/input/radio/radio-clamp-01-ref.html12
-rw-r--r--layout/reftests/forms/input/radio/radio-clamp-01.html33
-rw-r--r--layout/reftests/forms/input/radio/radio-clamp-02-ref.html37
-rw-r--r--layout/reftests/forms/input/radio/radio-clamp-02.html38
-rw-r--r--layout/reftests/forms/input/radio/radio-minimum-size-ref.html2
-rw-r--r--layout/reftests/forms/input/radio/radio-minimum-size.html22
-rw-r--r--layout/reftests/forms/input/radio/reftest.list10
-rw-r--r--layout/reftests/forms/input/radio/unchecked-appearance-none.html2
15 files changed, 307 insertions, 0 deletions
diff --git a/layout/reftests/forms/input/radio/checked-appearance-none.html b/layout/reftests/forms/input/radio/checked-appearance-none.html
new file mode 100644
index 0000000000..37aed5826e
--- /dev/null
+++ b/layout/reftests/forms/input/radio/checked-appearance-none.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type="radio" style="-moz-appearance:none" checked>
diff --git a/layout/reftests/forms/input/radio/checked-native-notref.html b/layout/reftests/forms/input/radio/checked-native-notref.html
new file mode 100644
index 0000000000..c9483ac056
--- /dev/null
+++ b/layout/reftests/forms/input/radio/checked-native-notref.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type="radio">
diff --git a/layout/reftests/forms/input/radio/checked-native.html b/layout/reftests/forms/input/radio/checked-native.html
new file mode 100644
index 0000000000..7e7673afd0
--- /dev/null
+++ b/layout/reftests/forms/input/radio/checked-native.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type="radio" checked>
diff --git a/layout/reftests/forms/input/radio/gtk-theme-width-height-ref.html b/layout/reftests/forms/input/radio/gtk-theme-width-height-ref.html
new file mode 100644
index 0000000000..eb34f6fe74
--- /dev/null
+++ b/layout/reftests/forms/input/radio/gtk-theme-width-height-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 932506</title>
+ <style>
+
+input { outline:1px solid black; }
+
+</style>
+</head>
+<body>
+
+<div style="overflow:hidden; width:120px;">
+ <div style="float:left; width:799px; border:1px solid blue;">
+ <input type="radio" checked style="width:400px; visibility:hidden;">
+ <input type="radio" checked style="width:400px; height:100px; visibility:hidden;">
+ </div>
+</div>
+
+
+<input type="radio" checked style="width:400px;"><br>
+<input type="radio" checked style="height:100px;"><br>
+<input type="radio" checked style=""><br>
+
+<input type="radio" checked style="width:400px;"><br>
+<input type="radio" checked style="height:100px;"><br>
+<input type="radio" checked style=""><br>
+
+</body>
+</html>
diff --git a/layout/reftests/forms/input/radio/gtk-theme-width-height.html b/layout/reftests/forms/input/radio/gtk-theme-width-height.html
new file mode 100644
index 0000000000..9a333d7bb5
--- /dev/null
+++ b/layout/reftests/forms/input/radio/gtk-theme-width-height.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 932506</title>
+ <style>
+
+input { outline:1px solid black; }
+
+</style>
+</head>
+<body>
+
+<div style="overflow:hidden; width:120px;">
+ <div style="float:left; width:799px; border:1px solid blue;">
+ <input type="radio" checked style="width:400px; outline:none;">
+ <input type="radio" checked style="width:400px; height:100px; outline:none;">
+ </div>
+</div>
+
+<input type="radio" checked style="width:400px; height:1px;"><br>
+<input type="radio" checked style="width:1px; height:100px;"><br>
+<input type="radio" checked style="width:1px; height:1px;"><br>
+
+<input type="radio" checked style="width:400px; height:0;"><br>
+<input type="radio" checked style="width:0; height:100px;"><br>
+<input type="radio" checked style="width:0; height:0;"><br>
+
+</body>
+</html>
diff --git a/layout/reftests/forms/input/radio/label-dynamic-ref.html b/layout/reftests/forms/input/radio/label-dynamic-ref.html
new file mode 100644
index 0000000000..5b0501bb8a
--- /dev/null
+++ b/layout/reftests/forms/input/radio/label-dynamic-ref.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+
+.hideradios input {
+ display: none;
+}
+
+label[for="a2"],
+label[for="b2"] {
+ background-color: yellow;
+}
+
+</style>
+
+</head>
+
+<body>
+
+<div>
+<div><input type="radio" name="a" id="a1"><label for="a1">radio #a1</label></div>
+<div><input type="radio" name="a" id="a2" checked><label for="a2">radio #a2</label></div>
+<div><input type="radio" name="a" id="a3"><label for="a3">radio #a3</label></div>
+<div><input type="radio" name="a" id="a4"><label for="a4">radio #a4</label></div>
+<div><input type="radio" name="a" id="a5"><label for="a5">radio #a5</label></div>
+</div>
+
+<div class="hideradios">
+<div><input type="radio" name="b" id="b1"><label for="b1">radio #b1</label></div>
+<div><input type="radio" name="b" id="b2" checked><label for="b2">radio #b2</label></div>
+<div><input type="radio" name="b" id="b3"><label for="b3">radio #b3</label></div>
+<div><input type="radio" name="b" id="b4"><label for="b4">radio #b4</label></div>
+<div><input type="radio" name="b" id="b5"><label for="b5">radio #b5</label></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/forms/input/radio/label-dynamic.html b/layout/reftests/forms/input/radio/label-dynamic.html
new file mode 100644
index 0000000000..143a0fb6dc
--- /dev/null
+++ b/layout/reftests/forms/input/radio/label-dynamic.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+
+.hideradios input {
+ display: none;
+}
+
+input:checked + label {
+ background-color: yellow;
+}
+
+</style>
+
+<script type="text/javascript">
+
+function chooseSecondItems()
+{
+ document.getElementById("a2").checked = true;
+ document.getElementById("b2").checked = true;
+}
+
+</script>
+</head>
+
+<body onload="chooseSecondItems();">
+
+<div>
+<div><input type="radio" name="a" id="a1"><label for="a1">radio #a1</label></div>
+<div><input type="radio" name="a" id="a2"><label for="a2">radio #a2</label></div>
+<div><input type="radio" name="a" id="a3"><label for="a3">radio #a3</label></div>
+<div><input type="radio" name="a" id="a4" checked><label for="a4">radio #a4</label></div>
+<div><input type="radio" name="a" id="a5"><label for="a5">radio #a5</label></div>
+</div>
+
+<div class="hideradios">
+<div><input type="radio" name="b" id="b1"><label for="b1">radio #b1</label></div>
+<div><input type="radio" name="b" id="b2"><label for="b2">radio #b2</label></div>
+<div><input type="radio" name="b" id="b3"><label for="b3">radio #b3</label></div>
+<div><input type="radio" name="b" id="b4" checked><label for="b4">radio #b4</label></div>
+<div><input type="radio" name="b" id="b5"><label for="b5">radio #b5</label></div>
+</div>
+
+</body>
+</html>
diff --git a/layout/reftests/forms/input/radio/radio-clamp-01-ref.html b/layout/reftests/forms/input/radio/radio-clamp-01-ref.html
new file mode 100644
index 0000000000..6104ce1adc
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-clamp-01-ref.html
@@ -0,0 +1,12 @@
+<style>
+ div {
+ top: 50px;
+ line-height: 0px;
+ position: relative;
+ }
+</style>
+
+<div>
+ <input type="radio">
+ <input type="radio" checked>
+</div>
diff --git a/layout/reftests/forms/input/radio/radio-clamp-01.html b/layout/reftests/forms/input/radio/radio-clamp-01.html
new file mode 100644
index 0000000000..9d811760c0
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-clamp-01.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Test clamping width/height of radio.</title>
+ <link rel="author" title="Louis Chang" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1400050">
+ <link rel="match" href="radio-clamp-ref.html">
+ </head>
+ <style>
+div {
+ position: relative;
+ line-height: 0px;
+}
+input {
+ height: 113px;
+}
+ </style>
+ <body>
+ <!--
+ Default Size of radio is 13px * 13px on all platforms except Linux
+ (18px * 18px). So given a radio with height 113px, the radio will be
+ clamped to 13px * 13px and move to center which y is 50px ((113 - 13) / 2).
+ -->
+ <div>
+ <input type="radio">
+ <input type="radio" checked>
+ <div>
+ </body>
+</html>
diff --git a/layout/reftests/forms/input/radio/radio-clamp-02-ref.html b/layout/reftests/forms/input/radio/radio-clamp-02-ref.html
new file mode 100644
index 0000000000..2061a67420
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-clamp-02-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 1405986</title>
+ <style type="text/css">
+html,body {
+ color: black;
+ background-color: white;
+ font: 16px/1 monospace;
+ padding: 0;
+ margin: 0;
+}
+
+.grid {
+ display: inline-grid;
+ grid: 100px / 40px 40px;
+ border: 1px solid;
+ vertical-align: top;
+ justify-items: start;
+}
+
+input {
+ margin: 0;
+}
+ </style>
+</head>
+<body>
+ <div class="grid">
+ <input type=radio style="align-self: center">
+ <input type=radio checked style="align-self: center">
+ </div>
+</body>
+</html>
diff --git a/layout/reftests/forms/input/radio/radio-clamp-02.html b/layout/reftests/forms/input/radio/radio-clamp-02.html
new file mode 100644
index 0000000000..11ec57906b
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-clamp-02.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html><head>
+ <meta charset="utf-8">
+ <title>Testcase for bug 1405986</title>
+ <style type="text/css">
+html,body {
+ color: black;
+ background-color: white;
+ font: 16px/1 monospace;
+ padding: 0;
+ margin: 0;
+}
+
+.grid {
+ display: inline-grid;
+ grid: 100px / 40px 40px;
+ border: 1px solid;
+ vertical-align: top;
+ justify-items: start;
+}
+
+input {
+ margin: 0;
+}
+ </style>
+</head>
+<body>
+ <div class="grid">
+ <input type=radio style="height: 100px">
+ <input type=radio checked style="height: 100px">
+ </div>
+</body>
+</html>
+
diff --git a/layout/reftests/forms/input/radio/radio-minimum-size-ref.html b/layout/reftests/forms/input/radio/radio-minimum-size-ref.html
new file mode 100644
index 0000000000..d4539020b0
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-minimum-size-ref.html
@@ -0,0 +1,2 @@
+<input type="radio">
+<input type="radio" checked>
diff --git a/layout/reftests/forms/input/radio/radio-minimum-size.html b/layout/reftests/forms/input/radio/radio-minimum-size.html
new file mode 100644
index 0000000000..21bdb6b154
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-minimum-size.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Test minimum size of radio.</title>
+ <link rel="author" title="Louis Chang" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1404770">
+ <link rel="match" href="radio-minimum-size-ref.html">
+ <style type="text/css">
+input {
+ height: 0px;
+}
+ </style>
+ </head>
+ <body>
+ <input type="radio">
+ <input type="radio" checked>
+ </body>
+</html>
diff --git a/layout/reftests/forms/input/radio/reftest.list b/layout/reftests/forms/input/radio/reftest.list
new file mode 100644
index 0000000000..c69e0b1c26
--- /dev/null
+++ b/layout/reftests/forms/input/radio/reftest.list
@@ -0,0 +1,10 @@
+== label-dynamic.html label-dynamic-ref.html
+!= checked-native.html checked-native-notref.html
+== checked-appearance-none.html about:blank
+== unchecked-appearance-none.html about:blank
+!= checked-native.html about:blank
+!= checked-native-notref.html about:blank
+skip-if(!gtkWidget) == gtk-theme-width-height.html gtk-theme-width-height-ref.html
+skip-if(gtkWidget) fails-if(geckoview&&webrender) fails-if(Android) == radio-clamp-01.html radio-clamp-01-ref.html
+skip-if(OSX||winWidget||Android) fuzzy-if(gtkWidget&&nativeThemePref,24-24,16-16) == radio-clamp-02.html radio-clamp-02-ref.html # gtkWidget, Bug 1599622
+fails-if(OSX) == radio-minimum-size.html radio-minimum-size-ref.html
diff --git a/layout/reftests/forms/input/radio/unchecked-appearance-none.html b/layout/reftests/forms/input/radio/unchecked-appearance-none.html
new file mode 100644
index 0000000000..e30a1ef396
--- /dev/null
+++ b/layout/reftests/forms/input/radio/unchecked-appearance-none.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type="radio" style="-moz-appearance:none">