Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / 5290534.html
blob14b9ff257e272d5093253e22df277132341dd504
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>
4 <ul id="console"></ul>
6 <script>
7 function log(msg)
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.");
25 </script>