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
);
12 if (window
.testRunner
)
13 window
.testRunner
.dumpAsText();
15 var field1
= document
.getElementById("field1");
16 var field2
= document
.getElementById("field2");
18 field1
.parentNode
.removeChild(field1
);
20 log("Success: finished the test without crashing.");
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>