summaryrefslogtreecommitdiffstats
path: root/layout/reftests/display-list/1429027-1.html
blob: ea89a576345a47ac9918c2e8d3e3c74063e3ac97 (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
30
31
32
33
34
35
<!DOCTYPE html>
<html class="reftest-wait">
<head>
  <title>Bug 1429027 - No caret</title>
  <meta charset="utf-8">
</head>
<body>
<form autocomplete="off">
  <input autofocus value="test">
</form>

<script type="text/javascript">
function done() {
  document.documentElement.removeAttribute("class");
}

function focus() {
  document.querySelector("input").focus();
  setTimeout(done, 0);
}

function clearInput() {
  document.querySelector("input").value = "";
  setTimeout(focus, 0);
}

function doTest() {
  document.querySelector("input").focus();
  setTimeout(clearInput, 0);
}

window.addEventListener("MozReftestInvalidate", doTest);
</script>
</body>
</html>