Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / selection / 5209984.html
blob573e3d90304eb7df127ecc229333ff8d4a842cfb
1 <body onmouseup="handleMouseUp()">
2 This tests for a crash when clicking on a page after an input element with a selection inside of it disappears. To run it manually, just click on this text (a selection has already been placed inside a disappearing text field).<br>
3 <input type="text" id="input" value="value"><br>
4 <ul id="console"></ul>
5 </body>
7 <script>
8 function log(msg) {
9 console = document.getElementById("console");
10 li = document.createElement("li");
11 text = document.createTextNode(msg);
12 console.appendChild(li);
13 li.appendChild(text);
15 function handleMouseUp() {
16 log("Success!");
19 if (window.testRunner)
20 window.testRunner.dumpAsText();
22 input = document.getElementById("input");
23 input.setSelectionRange(0, 1);
24 input.style.display = "none";
26 if (window.testRunner) {
27 eventSender.mouseMoveTo(50, 50);
28 eventSender.mouseDown();
29 eventSender.mouseUp();
31 </script>