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

Side by Side Diff: LayoutTests/editing/selection/5497643.html

Issue 258063005: 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: Addressing changes asked in previous patch 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 to make sure that a selection inside a textarea is updated when th e textarea is removed from the document.</p> 1 <p>This tests to make sure that a selection inside a textarea is updated when th e textarea is removed from the document.</p>
2 <textarea id="textarea"></textarea> 2 <textarea id="textarea"></textarea>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 window.testRunner.dumpAsText(); 5 window.testRunner.dumpAsText();
6 textarea = document.getElementById("textarea"); 6 textarea = document.getElementById("textarea");
7 textarea.setSelectionRange(0, 0); 7 textarea.focus();
8 textarea.parentNode.removeChild(textarea); 8 textarea.parentNode.removeChild(textarea);
9 if (window.getSelection().type == 'Caret' && 9 if (window.getSelection().type == 'Caret' &&
10 window.getSelection().getRangeAt(0).startContainer == document.body && 10 window.getSelection().getRangeAt(0).startContainer == document.body &&
11 window.getSelection().getRangeAt(0).startOffset == 2) 11 window.getSelection().getRangeAt(0).startOffset == 2)
12 alert("SUCCESS: Selection is set to position 2 of BODY.") 12 alert("SUCCESS: Selection is set to position 2 of BODY.")
13 else 13 else
14 alert("FAILURE: The selection is not set correctly after textarea was delete d.") 14 alert("FAILURE: The selection is not set correctly after textarea was delete d.")
15 </script> 15 </script>
OLDNEW
« no previous file with comments | « LayoutTests/editing/pasteboard/pasting-tabs.html ('k') | LayoutTests/fast/forms/input-placeholder-visibility-2-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698