https://github.com/mozilla/gecko-dev
Raw File
Tip revision: b676eb28fb317f5d7ee7b1363af6c886511377d5 authored by Ehsan Akhgari on 17 April 2014, 14:59:10 UTC
Bug 772823 - Focus the main test window before closing the newly opened window in order to work around an unknown focus manager bug. r=gavin, a=test-only
Tip revision: b676eb2
placeholder-10.html
<!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>
back to top