summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/input/radio
diff options
context:
space:
mode:
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/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.html34
-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-notref.html2
-rw-r--r--layout/reftests/forms/input/radio/radio-minimum-size.html22
-rw-r--r--layout/reftests/forms/input/radio/reftest.list9
-rw-r--r--layout/reftests/forms/input/radio/unchecked-appearance-none.html2
13 files changed, 246 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/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..e4ca9cd05a
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-clamp-01.html
@@ -0,0 +1,34 @@
+<!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;
+}
+ </style>
+ <body>
+ <div>
+ <input type="radio">
+ <input type="radio" checked>
+ <div>
+ <script>
+ // If we grow the radio vertically, horizontal size shouldn't change,
+ // instead it should be centered vertically. We grow it by a hundred
+ // pixels, and the reference positions it manually at 50px, which is where
+ // it should end up.
+ for (let input of document.querySelectorAll("input")) {
+ input.style.height = (100 + input.getBoundingClientRect().height) + "px";
+ }
+ </script>
+ </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-notref.html b/layout/reftests/forms/input/radio/radio-minimum-size-notref.html
new file mode 100644
index 0000000000..d4539020b0
--- /dev/null
+++ b/layout/reftests/forms/input/radio/radio-minimum-size-notref.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..6c80eaf447
--- /dev/null
+++ b/layout/reftests/forms/input/radio/reftest.list
@@ -0,0 +1,9 @@
+== 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
+== radio-clamp-01.html radio-clamp-01-ref.html
+skip-if(OSX||winWidget||Android) == radio-clamp-02.html radio-clamp-02-ref.html
+!= radio-minimum-size.html radio-minimum-size-notref.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">