diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/reftests/forms/placeholder | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/forms/placeholder')
37 files changed, 595 insertions, 0 deletions
diff --git a/layout/reftests/forms/placeholder/placeholder-1-password.html b/layout/reftests/forms/placeholder/placeholder-1-password.html new file mode 100644 index 000000000..1c3d582f1 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-1-password.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test: placeholder should be used by input password elements --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input type="password" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-1-text.html b/layout/reftests/forms/placeholder/placeholder-1-text.html new file mode 100644 index 000000000..30df2f348 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-1-text.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test: placeholder should be used by input text elements --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input type="text" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-1-textarea.html b/layout/reftests/forms/placeholder/placeholder-1-textarea.html new file mode 100644 index 000000000..89f990ce0 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-1-textarea.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test: placeholder should be used by textarea elements --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <textarea placeholder="my placeholder"></textarea> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-10.html b/layout/reftests/forms/placeholder/placeholder-10.html new file mode 100644 index 000000000..40a35669e --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-10.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when unfocused, if value='', newest placeholder should be shown --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function setPlaceholder() + { + document.getElementById('p1').placeholder = 'my placeholder'; + } + function unFocusPlaceholder() + { + document.getElementById('p1').blur(); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" placeholder="old placeholder" onfocus="setPlaceholder(); unFocusPlaceholder(); disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-11.html b/layout/reftests/forms/placeholder/placeholder-11.html new file mode 100644 index 000000000..62c77351c --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-11.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test: placeholder shouldn't show new lines ( version) --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input type="text" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-12.html b/layout/reftests/forms/placeholder/placeholder-12.html new file mode 100644 index 000000000..7cfd00a0e --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-12.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test: placeholder shouldn't show new lines ( version) --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input type="text" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-13.html b/layout/reftests/forms/placeholder/placeholder-13.html new file mode 100644 index 000000000..19fc17293 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-13.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: placeholder shouldn't show new lines (\r version) --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function setPlaceholder() + { + document.getElementById('p1').placeholder = 'my\r placeholder'; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + <body onload="setPlaceholder(); disableReftestWait();"> + <input type="text" id="p1" value="" placeholder=""> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-14.html b/layout/reftests/forms/placeholder/placeholder-14.html new file mode 100644 index 000000000..ad99420eb --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-14.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: placeholder shouldn't show new lines (\n version) --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function setPlaceholder() + { + document.getElementById('p1').placeholder = 'my\n placeholder'; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + <body onload="setPlaceholder(); disableReftestWait();"> + <input type="text" id="p1" value="" placeholder=""> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-18.html b/layout/reftests/forms/placeholder/placeholder-18.html new file mode 100644 index 000000000..159d5d7e2 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-18.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: placeholder should appear with dynamic DOM modifications --> + <script type="text/javascript"> + function setPlaceholder() + { + var i = document.getElementById('p1'); + i.focus(); + i.blur(); + i.value = "not empty"; + i.value = ""; + i.value = "my value"; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + <body onload="setPlaceholder(); disableReftestWait();"> + <input type="text" id="p1" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-19.xul b/layout/reftests/forms/placeholder/placeholder-19.xul new file mode 100644 index 000000000..e176e0f9b --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-19.xul @@ -0,0 +1,23 @@ +<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + class="reftest-wait"> + <script type="text/javascript"><![CDATA[ + window.addEventListener("load", function() { + var x = document.getElementById("x"); + x.value = "val"; + x.focus();x.blur(); + setTimeout(function() { + x.value = ""; + x.hidden = true; + setTimeout(function() { + x.value = "value"; + x.hidden = false; + x.focus();x.blur(); + document.documentElement.removeAttribute("class"); + }, 0); + }, 0); + }, false); + ]]></script> + <textbox id="x" placeholder="placeholder"/> +</window> + diff --git a/layout/reftests/forms/placeholder/placeholder-2-textarea.html b/layout/reftests/forms/placeholder/placeholder-2-textarea.html new file mode 100644 index 000000000..06678a3db --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-2-textarea.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: placeholder has to be used if set via javascript --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function setPlaceholder() + { + document.getElementById('p1').placeholder = "my placeholder"; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="setPlaceholder(); disableReftestWait();"> + <textarea id="p1" placeholder=""></textarea> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-2.html b/layout/reftests/forms/placeholder/placeholder-2.html new file mode 100644 index 000000000..36b883ab2 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-2.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: placeholder has to be used if set via javascript --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function setPlaceholder() + { + document.getElementById('p1').placeholder = "my placeholder"; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="setPlaceholder(); disableReftestWait();"> + <input type="text" id="p1" value="" placeholder=""> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-20.html b/layout/reftests/forms/placeholder/placeholder-20.html new file mode 100644 index 000000000..323cea849 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-20.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <!-- Test: when focused, if value='', newest placeholder should be shown. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function setPlaceholder() + { + document.getElementById('p1').placeholder = 'my placeholder'; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" onfocus="setPlaceholder(); disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-21.html b/layout/reftests/forms/placeholder/placeholder-21.html new file mode 100644 index 000000000..483b0d49d --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-21.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when focused, clearing placeholder attribute should work. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function setPlaceholder() + { + document.getElementById('p1').removeAttribute('placeholder'); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="setPlaceholder(); disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-22.html b/layout/reftests/forms/placeholder/placeholder-22.html new file mode 100644 index 000000000..7ae54e8e7 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-22.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: when focused, clearing placeholder attribute should work. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function setPlaceholder() + { + document.getElementById('p1').placeholder = ''; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="setPlaceholder(); disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-3.html b/layout/reftests/forms/placeholder/placeholder-3.html new file mode 100644 index 000000000..b58f7ca72 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-3.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <!-- Test: value has to be shown when not null --> + <body> + <input type="text" value="my value" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-4.html b/layout/reftests/forms/placeholder/placeholder-4.html new file mode 100644 index 000000000..bfcce20b8 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-4.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: value has to be shown if set via javascript --> + <script type="text/javascript"> + function setValue() + { + document.getElementById('p1').value = "my value"; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="setValue(); disableReftestWait();"> + <input type="text" id="p1" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-5.html b/layout/reftests/forms/placeholder/placeholder-5.html new file mode 100644 index 000000000..0f766d160 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-5.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <!-- Test: placeholder has to be shown if value is reseted via javascript --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function setValue() + { + document.getElementById('p1').value = ""; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="setValue(); disableReftestWait();"> + <input type="text" id="p1" value="my value" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-6-textarea.html b/layout/reftests/forms/placeholder/placeholder-6-textarea.html new file mode 100644 index 000000000..b56cb0478 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-6-textarea.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test placeholder behavior when textarea is too small --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <textarea cols="5" rows="3" placeholder="my placeholder"></textarea> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-6.html b/layout/reftests/forms/placeholder/placeholder-6.html new file mode 100644 index 000000000..774aa35d4 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-6.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <!-- Test placeholder behavior when input is too small --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input type="text" size="5" value="" placeholder="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-7.html b/layout/reftests/forms/placeholder/placeholder-7.html new file mode 100644 index 000000000..19fc8eb74 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-7.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <!-- Test: when focused, element should show placeholder. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-8.html b/layout/reftests/forms/placeholder/placeholder-8.html new file mode 100644 index 000000000..9c1ac995a --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-8.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <!-- Test: when focused, if value='', newest placeholder should be shown. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function setPlaceholder() + { + document.getElementById('p1').placeholder = 'my placeholder'; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" placeholder="old placeholder" onfocus="setPlaceholder(); disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-9.html b/layout/reftests/forms/placeholder/placeholder-9.html new file mode 100644 index 000000000..35155c012 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-9.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <!-- Test: when focused, value reset should show placeholder. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function resetValue() + { + document.getElementById('p1').value = ''; + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="my value" placeholder="my placeholder" onfocus="resetValue(); disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-blank-ref.html b/layout/reftests/forms/placeholder/placeholder-blank-ref.html new file mode 100644 index 000000000..115ffac79 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-blank-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <script type="text/javascript"> + function focusInput() + { + document.getElementById('t1').focus(); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + <body onload="focusInput();"> + <input id='t1' type="text" onfocus="disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-focus-pref.html b/layout/reftests/forms/placeholder/placeholder-focus-pref.html new file mode 100644 index 000000000..cdfd92444 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-focus-pref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <!-- Test: when focused, element should not placeholder when + 'dom.placeholder.show_on_focus' pref is false. --> + <script type="text/javascript"> + function focusPlaceholder() + { + document.getElementById('p1').focus(); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + + <body onload="focusPlaceholder();"> + <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="disableReftestWait();"> + </body> +</html>
\ No newline at end of file diff --git a/layout/reftests/forms/placeholder/placeholder-focus-ref.html b/layout/reftests/forms/placeholder/placeholder-focus-ref.html new file mode 100644 index 000000000..fa8f292a4 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-focus-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <script type="text/javascript"> + function focusInput() + { + document.getElementById('t1').focus(); + } + function disableReftestWait() + { + document.documentElement.className = ''; + } + </script> + <body onload="focusInput();"> + <input id='t1' type="text" class="placeholder" value="my placeholder" onfocus="disableReftestWait();"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-overflow-ref.html b/layout/reftests/forms/placeholder/placeholder-overflow-ref.html new file mode 100644 index 000000000..9bceacd62 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-overflow-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <!-- + This test 'emulate' the placeholder by setting a style + to the value of an input text. + This test may break if placeholder default style is changed. + --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + + <body> + <input type="text" class="placeholder" size="5" value="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-overflow-textarea-ref.html b/layout/reftests/forms/placeholder/placeholder-overflow-textarea-ref.html new file mode 100644 index 000000000..559945a50 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-overflow-textarea-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <!-- + This test 'emulate' the placeholder by setting a style + to the value of a textarea. + This test may break if placeholder default style is changed. + --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + + <body> + <textarea class="placeholder" cols="5" rows="3">my placeholder</textarea> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-overridden-ref.html b/layout/reftests/forms/placeholder/placeholder-overridden-ref.html new file mode 100644 index 000000000..11f756af6 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-overridden-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <input type="text" value="my value"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-overridden-ref.xul b/layout/reftests/forms/placeholder/placeholder-overridden-ref.xul new file mode 100644 index 000000000..706f27fbb --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-overridden-ref.xul @@ -0,0 +1,5 @@ +<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + <textbox placeholder="placeholder" value="value"/> +</window> + diff --git a/layout/reftests/forms/placeholder/placeholder-rtl-ref.html b/layout/reftests/forms/placeholder/placeholder-rtl-ref.html new file mode 100644 index 000000000..91812d0ce --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-rtl-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html dir='rtl'> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input class='placeholder' value='foo'> + <textarea class='placeholder' >foo</textarea> + </body> +</html> + diff --git a/layout/reftests/forms/placeholder/placeholder-rtl.html b/layout/reftests/forms/placeholder/placeholder-rtl.html new file mode 100644 index 000000000..5898ed55c --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-rtl.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html dir='rtl'> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + <body> + <input placeholder='foo'> + <textarea placeholder='foo'></textarea> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-style.css b/layout/reftests/forms/placeholder/placeholder-style.css new file mode 100644 index 000000000..0c5bb6333 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-style.css @@ -0,0 +1,10 @@ +textarea.placeholder, +input.placeholder, +input::placeholder, +textarea::placeholder { + /* Unfortunately, we can't style the <input> or <textarea> text so we can't + set it to opacity: 0.54; which means we have to revert the style to + something that doesn't include an opacity. */ + color: GrayText; + opacity: 1.0; +} diff --git a/layout/reftests/forms/placeholder/placeholder-visible-ref.html b/layout/reftests/forms/placeholder/placeholder-visible-ref.html new file mode 100644 index 000000000..b05267457 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-visible-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <!-- + This test 'emulate' the placeholder by setting a style + to the value of an input text. + This test may break if placeholder default style is changed. + --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + + <body> + <input type="text" class="placeholder" value="my placeholder"> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/placeholder-visible-textarea-ref.html b/layout/reftests/forms/placeholder/placeholder-visible-textarea-ref.html new file mode 100644 index 000000000..b7bda6f80 --- /dev/null +++ b/layout/reftests/forms/placeholder/placeholder-visible-textarea-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <!-- + This test 'emulate' the placeholder by setting a style + to the value of a textarea. + This test may break if placeholder default style is changed. + --> + <link rel='stylesheet' type='text/css' href='placeholder-style.css'> + + <body> + <textarea class="placeholder">my placeholder</textarea> + </body> +</html> diff --git a/layout/reftests/forms/placeholder/reftest-stylo.list b/layout/reftests/forms/placeholder/reftest-stylo.list new file mode 100644 index 000000000..e6766e944 --- /dev/null +++ b/layout/reftests/forms/placeholder/reftest-stylo.list @@ -0,0 +1,39 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# 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-1-text.html placeholder-1-text.html +== placeholder-1-password.html placeholder-1-password.html +== placeholder-1-textarea.html placeholder-1-textarea.html +== placeholder-2.html placeholder-2.html +== placeholder-2-textarea.html placeholder-2-textarea.html +== placeholder-3.html placeholder-3.html +== placeholder-4.html placeholder-4.html +== placeholder-5.html placeholder-5.html +fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) == placeholder-6.html placeholder-6.html +skip-if(B2G||Mulet||(Android&&asyncPan)) == placeholder-6-textarea.html placeholder-6-textarea.html +# Initial mulet triage: parity with B2G/B2G Desktop +# needs-focus == placeholder-7.html placeholder-7.html +# needs-focus == placeholder-8.html placeholder-8.html +# needs-focus == placeholder-9.html placeholder-9.html +needs-focus == placeholder-10.html placeholder-10.html +== placeholder-11.html placeholder-11.html +== placeholder-12.html placeholder-12.html +== placeholder-13.html placeholder-13.html +== placeholder-14.html placeholder-14.html +== placeholder-18.html placeholder-18.html +random-if(winWidget) skip-if((B2G&&browserIsRemote)||Mulet) == placeholder-19.xul placeholder-19.xul +# bug 974780 +# Initial mulet triage: parity with B2G/B2G Desktop +# needs-focus == placeholder-20.html placeholder-20.html +needs-focus == placeholder-21.html placeholder-21.html +needs-focus == placeholder-22.html placeholder-22.html +== placeholder-rtl.html placeholder-rtl.html +pref(dom.placeholder.show_on_focus,false) needs-focus == placeholder-focus-pref.html placeholder-focus-pref.html diff --git a/layout/reftests/forms/placeholder/reftest.list b/layout/reftests/forms/placeholder/reftest.list new file mode 100644 index 000000000..525b4ab74 --- /dev/null +++ b/layout/reftests/forms/placeholder/reftest.list @@ -0,0 +1,35 @@ +# 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-1-text.html placeholder-visible-ref.html +== placeholder-1-password.html placeholder-visible-ref.html +== placeholder-1-textarea.html placeholder-visible-textarea-ref.html +== placeholder-2.html placeholder-visible-ref.html +== placeholder-2-textarea.html placeholder-visible-textarea-ref.html +== placeholder-3.html placeholder-overridden-ref.html +== placeholder-4.html placeholder-overridden-ref.html +== placeholder-5.html placeholder-visible-ref.html +fuzzy-if(winWidget,160,10) fuzzy-if(Android,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,146,317) fuzzy-if(OSX==1010&&browserIsRemote,1,8) == placeholder-6.html placeholder-overflow-ref.html +skip-if(Android&&asyncPan) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html +# needs-focus == placeholder-7.html placeholder-focus-ref.html +# needs-focus == placeholder-8.html placeholder-focus-ref.html +# needs-focus == placeholder-9.html placeholder-focus-ref.html +needs-focus == placeholder-10.html placeholder-visible-ref.html +== placeholder-11.html placeholder-visible-ref.html +== placeholder-12.html placeholder-visible-ref.html +== placeholder-13.html placeholder-visible-ref.html +== placeholder-14.html placeholder-visible-ref.html +== placeholder-18.html placeholder-overridden-ref.html +random-if(winWidget) == placeholder-19.xul placeholder-overridden-ref.xul +# needs-focus == placeholder-20.html placeholder-focus-ref.html +needs-focus == placeholder-21.html placeholder-blank-ref.html +needs-focus == placeholder-22.html placeholder-blank-ref.html +== placeholder-rtl.html placeholder-rtl-ref.html +pref(dom.placeholder.show_on_focus,false) needs-focus == placeholder-focus-pref.html placeholder-blank-ref.html |