1 <p>This tests for a crash when adding/removing content from a search field that is inside an editable region.
</p>
3 <div contenteditable=
"true"><input id=
"search" type=
"search"></div>
9 li
= document
.createElement("li");
10 li
.appendChild(document
.createTextNode(msg
));
11 document
.getElementById("console").appendChild(li
);
14 if (window
.testRunner
)
15 window
.testRunner
.dumpAsText();
17 var search
= document
.getElementById("search");
18 search
.setSelectionRange(0, 0);
19 document
.execCommand("InsertText", false, "x");
20 if (search
.value
!= "x")
21 log("Failure: text wasn't added to the search field.");
22 document
.execCommand("Delete");
23 if (search
.value
== "")
24 log("Success! Test successfully removed text from the search field.");