Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / forms / textfield-focus-out.html
blob4474e7d34937efbaa7a716582d187d3af16aa058
2 <script>
3 function log(message) {
4 var console = document.getElementById("console");
5 var li = document.createElement("li");
6 var text = document.createTextNode(message);
7 console.appendChild(li);
8 li.appendChild(text);
11 function runTest() {
12 if (window.layoutTestController)
13 window.layoutTestController.dumpAsText();
15 var field1 = document.getElementById("field1");
16 var field2 = document.getElementById("field2");
18 field1.parentNode.removeChild(field1);
19 field2.focus();
20 log("Success: finished the test without crashing.");
22 </script>
24 <body onLoad="document.getElementById('field1').focus();">
25 <p>This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=7363">https://bugs.webkit.org/show_bug.cgi?id=7363</a>. Taking focus away from a text field that no longer had focus was crashing Safari.</p>
26 <input id="field1" type="text" value="field1" onFocus="runTest()">
27 <input id="field2" type="text" value="field2">
28 <ul id="console"></ul>