summaryrefslogtreecommitdiffstats
path: root/layout/base/tests/bug956530-1-ref.html
blob: d998b6d8b5da506f4b8abb4827e9fc16be1f51f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html class="reftest-wait">
  <style>
  /* eliminate the blue glow when focusing the element. */
  input {
    background: none;
    border: none;
    outline: none;
  }
  </style>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script>
    async function test() {
      let input = document.querySelector("input");
      let waitForFocus = new Promise(resolve => {
        input.addEventListener("focus", resolve, {once: true});
      });
      window.focus();
      input.focus();
      await waitForFocus;
      input.select();
      await new Promise(resolve => { SimpleTest.executeSoon(resolve); });
      document.documentElement.removeAttribute("class");
    }
  </script>
  <body onload="SimpleTest.executeSoon(test);">
    <input value="text text text text text">
  </body>
</html>