Integrate media query evaluation into HTML5 event loop
[WebKit-https.git] / LayoutTests / fast / events / focus-change-crash.html
1 <div>Type something into the first input and press tab.  The browser should not crash.</div>
2 <div id="parent">
3 <input id="a" />
4 <input id="b" />
5 </div>
6 <div id="results"></div>
7 <script>
8 document.getElementById("a").addEventListener("change", function(e) {
9     var parent = document.getElementById("parent");
10     parent.innerHTML = "<input id='c' />";
11     document.getElementById("c").select();
12 }, false);
13
14 function runTest()
15 {
16     document.getElementById("a").focus();
17     if (!window.testRunner)
18         return;
19     testRunner.dumpAsText();
20     eventSender.keyDown("x")
21     eventSender.keyDown("\t");
22     document.getElementById("results").innerText = "PASSED";
23 }
24
25 runTest();
26
27 </script>