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

Unified Diff: LayoutTests/editing/execCommand/selection-after-insert-list.html

Issue 111463002: Ensure selection is reset after changing the list type of existing list items including the last. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Computing indexForEndOfSelection only once Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/execCommand/selection-after-insert-list.html
diff --git a/LayoutTests/editing/execCommand/selection-after-insert-list.html b/LayoutTests/editing/execCommand/selection-after-insert-list.html
new file mode 100644
index 0000000000000000000000000000000000000000..1d00ca1208d928171b57056460fb2556c503faf0
--- /dev/null
+++ b/LayoutTests/editing/execCommand/selection-after-insert-list.html
@@ -0,0 +1,17 @@
+<script src="../../resources/dump-as-markup.js"></script>
+<div id="test" contenteditable>
+<ul>
+ <li id="first">ABC</li>
+ <li id="second">DEF</li>
+</ul>
+</div>
+<script>
+var selection = window.getSelection();
+var range = document.createRange();
+range.setStart(document.getElementById('first').firstChild, 2);
+range.setEnd(document.getElementById('second').firstChild, 3);
+selection.addRange(range);
+document.execCommand('InsertOrderedList', false, null);
+Markup.description("This tests verifies that the selection is properly reset after executing the command.");
+Markup.dump('test');
+</script>

Powered by Google App Engine
This is Rietveld 408576698