Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Side by Side Diff: LayoutTests/fast/forms/paste-into-textarea.html

Issue 374883004: Revert of Blink does not respect input.selectionStart and input.selectionEnd for some cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <p>This tests for a bug where text pasted into a textarea would appear one chara cter before the position where it was pasted.</p> 1 <p>This tests for a bug where text pasted into a textarea would appear one chara cter before the position where it was pasted.</p>
2 <textarea rows=5 id="test">xx</textarea> 2 <textarea rows=5 id="test">xx</textarea>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 var e = document.getElementById("test"); 6 var e = document.getElementById("test");
7 e.focus();
8 e.setSelectionRange(1, 1); 7 e.setSelectionRange(1, 1);
9 document.execCommand("InsertHTML", false, "(There should be one 'x' before and a fter this sentence.)"); 8 document.execCommand("InsertHTML", false, "(There should be one 'x' before and a fter this sentence.)");
10 if (e.value == "x(There should be one 'x' before and after this sentence.)x") 9 if (e.value == "x(There should be one 'x' before and after this sentence.)x")
11 document.write("<p>Hooray, test succeeded.</p>"); 10 document.write("<p>Hooray, test succeeded.</p>");
12 else 11 else
13 document.write("<p>Test failed, value is '" + e.value + "'.</p>"); 12 document.write("<p>Test failed, value is '" + e.value + "'.</p>");
14 </script> 13 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/input-setvalue-selection.html ('k') | LayoutTests/fast/forms/textarea-arrow-navigation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698