summaryrefslogtreecommitdiffstats
path: root/layout/reftests/forms/input/search
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/forms/input/search
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--layout/reftests/forms/input/search/1.html7
-rw-r--r--layout/reftests/forms/input/search/2.html18
-rw-r--r--layout/reftests/forms/input/search/3.html19
-rw-r--r--layout/reftests/forms/input/search/appearance-textfield-dynamic.html7
-rw-r--r--layout/reftests/forms/input/search/appearance-textfield.html2
-rw-r--r--layout/reftests/forms/input/search/ref.html6
-rw-r--r--layout/reftests/forms/input/search/reftest.list8
-rw-r--r--layout/reftests/forms/input/search/search-basic.html2
-rw-r--r--layout/reftests/forms/input/search/search-with-value.html2
-rw-r--r--layout/reftests/forms/input/search/text-with-value.html2
-rw-r--r--layout/reftests/forms/input/search/text.html2
11 files changed, 75 insertions, 0 deletions
diff --git a/layout/reftests/forms/input/search/1.html b/layout/reftests/forms/input/search/1.html
new file mode 100644
index 0000000000..93bdd26b02
--- /dev/null
+++ b/layout/reftests/forms/input/search/1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <!-- Test: input element in search state looks like in text state -->
+ <body>
+ <input type="search">
+ </body>
+</html>
diff --git a/layout/reftests/forms/input/search/2.html b/layout/reftests/forms/input/search/2.html
new file mode 100644
index 0000000000..9c1f4151ab
--- /dev/null
+++ b/layout/reftests/forms/input/search/2.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: input element in search state looks like in text state -->
+ <script type="text/javascript">
+ function setToSearch()
+ {
+ document.getElementById('i').type = 'search';
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="setToSearch(); disableReftestWait();">
+ <input type='checkbox' id='i'>
+ </body>
+</html>
diff --git a/layout/reftests/forms/input/search/3.html b/layout/reftests/forms/input/search/3.html
new file mode 100644
index 0000000000..2e4ce9c8b5
--- /dev/null
+++ b/layout/reftests/forms/input/search/3.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <!-- Test: when switching to another type, the input element should not look
+ like an input search element -->
+ <script type="text/javascript">
+ function setToCheckbox()
+ {
+ document.getElementById('i').type = 'checkbox';
+ }
+ function disableReftestWait()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+
+ <body onload="setToCheckbox(); disableReftestWait();">
+ <input type='search' id='i'>
+ </body>
+</html>
diff --git a/layout/reftests/forms/input/search/appearance-textfield-dynamic.html b/layout/reftests/forms/input/search/appearance-textfield-dynamic.html
new file mode 100644
index 0000000000..db17afd707
--- /dev/null
+++ b/layout/reftests/forms/input/search/appearance-textfield-dynamic.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<input type=search>
+<script>
+ let input = document.querySelector("input");
+ input.getBoundingClientRect();
+ input.style.appearance = "textfield";
+</script>
diff --git a/layout/reftests/forms/input/search/appearance-textfield.html b/layout/reftests/forms/input/search/appearance-textfield.html
new file mode 100644
index 0000000000..24ce084dae
--- /dev/null
+++ b/layout/reftests/forms/input/search/appearance-textfield.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type=search style="appearance: textfield">
diff --git a/layout/reftests/forms/input/search/ref.html b/layout/reftests/forms/input/search/ref.html
new file mode 100644
index 0000000000..07e5eee7e6
--- /dev/null
+++ b/layout/reftests/forms/input/search/ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <input type="text">
+ </body>
+</html>
diff --git a/layout/reftests/forms/input/search/reftest.list b/layout/reftests/forms/input/search/reftest.list
new file mode 100644
index 0000000000..9fd0a13c49
--- /dev/null
+++ b/layout/reftests/forms/input/search/reftest.list
@@ -0,0 +1,8 @@
+== 1.html ref.html
+== 2.html ref.html
+!= 3.html ref.html
+pref(layout.forms.input-type-search.enabled,true) == search-basic.html ref.html
+pref(layout.forms.input-type-search.enabled,true) != search-with-value.html text-with-value.html
+
+== appearance-textfield.html text.html
+== appearance-textfield-dynamic.html appearance-textfield.html
diff --git a/layout/reftests/forms/input/search/search-basic.html b/layout/reftests/forms/input/search/search-basic.html
new file mode 100644
index 0000000000..5ece132c4e
--- /dev/null
+++ b/layout/reftests/forms/input/search/search-basic.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type=search>
diff --git a/layout/reftests/forms/input/search/search-with-value.html b/layout/reftests/forms/input/search/search-with-value.html
new file mode 100644
index 0000000000..e4b8fcb887
--- /dev/null
+++ b/layout/reftests/forms/input/search/search-with-value.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type=search value=foo>
diff --git a/layout/reftests/forms/input/search/text-with-value.html b/layout/reftests/forms/input/search/text-with-value.html
new file mode 100644
index 0000000000..d98f117bd6
--- /dev/null
+++ b/layout/reftests/forms/input/search/text-with-value.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type=text value=foo>
diff --git a/layout/reftests/forms/input/search/text.html b/layout/reftests/forms/input/search/text.html
new file mode 100644
index 0000000000..a46c54a7b7
--- /dev/null
+++ b/layout/reftests/forms/input/search/text.html
@@ -0,0 +1,2 @@
+<!doctype html>
+<input type=text>