Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / paste-into-textarea.html
bloba0055ded0b7c2e872c6bea19bd96110281724d45
1 <p>This tests for a bug where text pasted into a textarea would appear one character before the position where it was pasted.</p>
2 <textarea rows=5 id="test">xx</textarea>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
6 var e = document.getElementById("test");
7 e.setSelectionRange(1, 1);
8 document.execCommand("InsertHTML", false, "(There should be one 'x' before and after this sentence.)");
9 if (e.value == "x(There should be one 'x' before and after this sentence.)x")
10 document.write("<p>Hooray, test succeeded.</p>");
11 else
12 document.write("<p>Test failed, value is '" + e.value + "'.</p>");
13 </script>