blob: 3339380e8281941b2547b31dfe1ff9845d50fc96 [file] [log] [blame]
<script>
function log(message) {
var console = document.getElementById("console");
var li = document.createElement("li");
var text = document.createTextNode(message);
console.appendChild(li);
li.appendChild(text);
}
function runTest() {
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
var field1 = document.getElementById("field1");
var field2 = document.getElementById("field2");
field1.parentNode.removeChild(field1);
field2.focus();
log("Success: finished the test without crashing.");
}
</script>
<body onLoad="document.getElementById('field1').focus();">
<p>This is a test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7363">http://bugzilla.opendarwin.org/show_bug.cgi?id=7363</a>. Taking focus away from a text field that no longer had focus was crashing Safari.</p>
<input id="field1" type="text" value="field1" onFocus="runTest()">
<input id="field2" type="text" value="field2">
<ul id="console"></ul>