placeholder-focus-pref.html 622 B

1234567891011121314151617181920
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <link rel='stylesheet' type='text/css' href='placeholder-style.css'>
  4. <!-- Test: when focused, element should not placeholder when
  5. 'dom.placeholder.show_on_focus' pref is false. -->
  6. <script type="text/javascript">
  7. function focusPlaceholder()
  8. {
  9. document.getElementById('p1').focus();
  10. }
  11. function disableReftestWait()
  12. {
  13. document.documentElement.className = '';
  14. }
  15. </script>
  16. <body onload="focusPlaceholder();">
  17. <input type="text" id="p1" value="" placeholder="my placeholder" onfocus="disableReftestWait();">
  18. </body>
  19. </html>