summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-placeholder/textarea
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/css-placeholder/textarea
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.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 'layout/reftests/css-placeholder/textarea')
-rw-r--r--layout/reftests/css-placeholder/textarea/css-display.html14
-rw-r--r--layout/reftests/css-placeholder/textarea/css-opacity.html14
-rw-r--r--layout/reftests/css-placeholder/textarea/css-resize-ref.html13
-rw-r--r--layout/reftests/css-placeholder/textarea/css-resize.html20
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-add.html16
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-blur.html30
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-empty-string-ref.html7
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-empty-string.html7
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-focus-ref.html22
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-focus.html22
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-removal.html16
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-simple-ref.html8
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-simple.html8
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-value-ref.html7
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-value-reset.html19
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-value-set.html16
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-value-unset.html16
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholder-value.html8
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholdershown-ref.html7
-rw-r--r--layout/reftests/css-placeholder/textarea/placeholdershown.html7
-rw-r--r--layout/reftests/css-placeholder/textarea/reftest.list26
-rw-r--r--layout/reftests/css-placeholder/textarea/style-shown.css22
-rw-r--r--layout/reftests/css-placeholder/textarea/style.css6
-rw-r--r--layout/reftests/css-placeholder/textarea/textarea-ref.html7
24 files changed, 338 insertions, 0 deletions
diff --git a/layout/reftests/css-placeholder/textarea/css-display.html b/layout/reftests/css-placeholder/textarea/css-display.html
new file mode 100644
index 0000000000..717bfab7cd
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/css-display.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <style>
+ textarea::-moz-placeholder,
+ textarea::placeholder {
+ display: inline;
+ }
+ </style>
+ <body>
+ <textarea placeholder='foo'></textarea>
+ <textarea placeholder='bar'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/css-opacity.html b/layout/reftests/css-placeholder/textarea/css-opacity.html
new file mode 100644
index 0000000000..832f504eca
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/css-opacity.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <style>
+ textarea::-moz-placeholder,
+ textarea::placeholder {
+ opacity: 0.1;
+ }
+ </style>
+ <body>
+ <textarea placeholder='foo'></textarea>
+ <textarea placeholder='bar'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/css-resize-ref.html b/layout/reftests/css-placeholder/textarea/css-resize-ref.html
new file mode 100644
index 0000000000..c6e2e5b09e
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/css-resize-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <style>
+ textarea {
+ resize: none;
+ }
+ </style>
+ <body>
+ <textarea class='ref'>foo</textarea>
+ <textarea class='ref'>bar</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/css-resize.html b/layout/reftests/css-placeholder/textarea/css-resize.html
new file mode 100644
index 0000000000..81ea278b56
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/css-resize.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <!--
+ resize shouldn't be allowed on the ::placeholder.
+ -->
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <style>
+ textarea {
+ resize: none;
+ }
+ textarea::-moz-placeholder,
+ textarea::placeholder {
+ resize: both;
+ }
+ </style>
+ <body>
+ <textarea placeholder='foo'></textarea>
+ <textarea placeholder='bar'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-add.html b/layout/reftests/css-placeholder/textarea/placeholder-add.html
new file mode 100644
index 0000000000..9807f3d702
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-add.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').placeholder='foo';
+ document.getElementById('moz').placeholder='bar';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t'></textarea>
+ <textarea id='moz'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-blur.html b/layout/reftests/css-placeholder/textarea/placeholder-blur.html
new file mode 100644
index 0000000000..a1b7ebace4
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-blur.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').focus();
+ }
+ function focusHandler()
+ {
+ document.getElementById('t').blur();
+ }
+ function blurHandler()
+ {
+ document.getElementById('moz').focus();
+ }
+ function focusHandlerMoz()
+ {
+ document.getElementById('moz').blur();
+ }
+ function blurHandlerMoz()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t' placeholder='foo' onfocus='focusHandler();' onblur='blurHandler();'></textarea>
+ <textarea id='moz' placeholder='bar' onfocus='focusHandlerMoz();' onblur='blurHandlerMoz();'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-empty-string-ref.html b/layout/reftests/css-placeholder/textarea/placeholder-empty-string-ref.html
new file mode 100644
index 0000000000..09928f0ad2
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-empty-string-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='ref'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-empty-string.html b/layout/reftests/css-placeholder/textarea/placeholder-empty-string.html
new file mode 100644
index 0000000000..87f27256cd
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-empty-string.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea placeholder=''></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-focus-ref.html b/layout/reftests/css-placeholder/textarea/placeholder-focus-ref.html
new file mode 100644
index 0000000000..69318b626f
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-focus-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').focus();
+ }
+ function focusHandler()
+ {
+ document.getElementById('moz').focus();
+ }
+ function focusHandlerMoz()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t' class='ref' onfocus='focusHandler();'>foo</textarea>
+ <textarea id='moz' class='ref' onfocus='focusHandlerMoz();'>bar</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-focus.html b/layout/reftests/css-placeholder/textarea/placeholder-focus.html
new file mode 100644
index 0000000000..a8c97293da
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-focus.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').focus();
+ }
+ function focusHandler()
+ {
+ document.getElementById('moz').focus();
+ }
+ function focusHandlerMoz()
+ {
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t' placeholder='foo' onfocus='focusHandler();'></textarea>
+ <textarea id='moz' placeholder='bar' onfocus='focusHandlerMoz();'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-removal.html b/layout/reftests/css-placeholder/textarea/placeholder-removal.html
new file mode 100644
index 0000000000..727b216a99
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-removal.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').removeAttribute('placeholder');
+ document.getElementById('moz').removeAttribute('placeholder');
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t' placeholder='foo'></textarea>
+ <textarea id='moz' placeholder='bar'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-simple-ref.html b/layout/reftests/css-placeholder/textarea/placeholder-simple-ref.html
new file mode 100644
index 0000000000..c012cc4116
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-simple-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea class='ref'>foo</textarea>
+ <textarea class='ref'>bar</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-simple.html b/layout/reftests/css-placeholder/textarea/placeholder-simple.html
new file mode 100644
index 0000000000..5a9d3eb6f0
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-simple.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea placeholder='foo'></textarea>
+ <textarea placeholder='bar'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-value-ref.html b/layout/reftests/css-placeholder/textarea/placeholder-value-ref.html
new file mode 100644
index 0000000000..f8023e1c98
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-value-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea>bar</textarea>
+ <textarea>foo</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-value-reset.html b/layout/reftests/css-placeholder/textarea/placeholder-value-reset.html
new file mode 100644
index 0000000000..92fc7d79bd
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-value-reset.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').value = 'bar';
+ document.getElementById('moz').value = 'foo';
+ document.forms[0].reset();
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <form>
+ <textarea id='t' placeholder='foo'></textarea>
+ <textarea id='moz' placeholder='bar'></textarea>
+ </form>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-value-set.html b/layout/reftests/css-placeholder/textarea/placeholder-value-set.html
new file mode 100644
index 0000000000..30c3c26a4a
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-value-set.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').value = 'bar';
+ document.getElementById('moz').value = 'foo';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t' placeholder='foo'></textarea>
+ <textarea id='moz' placeholder='bar'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-value-unset.html b/layout/reftests/css-placeholder/textarea/placeholder-value-unset.html
new file mode 100644
index 0000000000..aacea6a203
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-value-unset.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <script>
+ function loadHandler()
+ {
+ document.getElementById('t').value = '';
+ document.getElementById('moz').value = '';
+ document.documentElement.className = '';
+ }
+ </script>
+ <body onload='loadHandler();'>
+ <textarea id='t' placeholder='foo'>bar</textarea>
+ <textarea id='moz' placeholder='bar'>foo</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholder-value.html b/layout/reftests/css-placeholder/textarea/placeholder-value.html
new file mode 100644
index 0000000000..a17bfa8f30
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholder-value.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <body>
+ <textarea placeholder='foo'>bar</textarea>
+ <textarea placeholder='bar'>foo</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholdershown-ref.html b/layout/reftests/css-placeholder/textarea/placeholdershown-ref.html
new file mode 100644
index 0000000000..caa109411c
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholdershown-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style-shown.css'>
+ <body>
+ <textarea class='shown-ref'>foo</textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/placeholdershown.html b/layout/reftests/css-placeholder/textarea/placeholdershown.html
new file mode 100644
index 0000000000..781ca2165d
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/placeholdershown.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <link rel='stylesheet' type='text/css' href='style-shown.css'>
+ <body>
+ <textarea class='shown' placeholder='foo'></textarea>
+ </body>
+</html>
diff --git a/layout/reftests/css-placeholder/textarea/reftest.list b/layout/reftests/css-placeholder/textarea/reftest.list
new file mode 100644
index 0000000000..a24dddf1fe
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/reftest.list
@@ -0,0 +1,26 @@
+# Tests using placeholder-focus-ref.html as a reference are disabled because
+# we can't change the caret colour nor disable it and we can't change the
+# text colour without changing the caret which means that the tested page has
+# a black caret with a grey text and the reference has a grey caret with grey
+# text. The only thing that is doable is to make the caret grey in the tested
+# page but that would make the test moot because a failure wouldn't be seen.
+# A real way to fix this would be to be able to style the caret or to implement
+# ::value (bug 648643), depending of the ::value behaviour (it could change the
+# caret colour and the text colour or just the text colour).
+
+== placeholder-simple.html placeholder-simple-ref.html
+# needs-focus == placeholder-focus.html placeholder-focus-ref.html
+needs-focus == placeholder-blur.html placeholder-simple-ref.html
+== placeholder-value.html placeholder-value-ref.html
+== placeholder-empty-string.html placeholder-empty-string-ref.html
+== placeholder-add.html placeholder-simple-ref.html
+== placeholder-removal.html textarea-ref.html
+== placeholder-value-set.html placeholder-value-ref.html
+== placeholder-value-unset.html placeholder-simple-ref.html
+== placeholder-value-reset.html placeholder-simple-ref.html
+== placeholdershown.html placeholdershown-ref.html
+== css-resize.html css-resize-ref.html
+== css-display.html placeholder-simple-ref.html
+# We can't check except by verifying that the output is different.
+# Same reasons as focus issues explained above.
+!= css-opacity.html placeholder-simple-ref.html
diff --git a/layout/reftests/css-placeholder/textarea/style-shown.css b/layout/reftests/css-placeholder/textarea/style-shown.css
new file mode 100644
index 0000000000..e7b33cef63
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/style-shown.css
@@ -0,0 +1,22 @@
+textarea::placeholder {
+ color: green;
+ opacity: 1.0;
+}
+
+textarea:placeholder-shown {
+ appearance: none;
+ color: FieldText;
+ background-color: red;
+}
+
+textarea:placeholder-shown.shown,
+textarea.shown-ref {
+ appearance: none;
+ color: green;
+ background-color: #c7c7c7;
+ font-style: italic;
+ border: 2px solid green;
+ height: 200px;
+ width: 200px;
+}
+
diff --git a/layout/reftests/css-placeholder/textarea/style.css b/layout/reftests/css-placeholder/textarea/style.css
new file mode 100644
index 0000000000..6d7893318d
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/style.css
@@ -0,0 +1,6 @@
+textarea::-moz-placeholder,
+textarea::placeholder,
+textarea.ref {
+ color: green;
+ opacity: 1.0;
+}
diff --git a/layout/reftests/css-placeholder/textarea/textarea-ref.html b/layout/reftests/css-placeholder/textarea/textarea-ref.html
new file mode 100644
index 0000000000..79f410593b
--- /dev/null
+++ b/layout/reftests/css-placeholder/textarea/textarea-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <textarea></textarea>
+ <textarea></textarea>
+ </body>
+</html>