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

Unified Diff: LayoutTests/editing/execCommand/selection-after-switch-type-of-listitem.html

Issue 114043002: Fix issue with selection being lost when InsertListCommand changes the list type. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing nit Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/editing/execCommand/selection-after-switch-type-of-listitem.html
diff --git a/LayoutTests/editing/execCommand/selection-after-insert-list.html b/LayoutTests/editing/execCommand/selection-after-switch-type-of-listitem.html
similarity index 50%
copy from LayoutTests/editing/execCommand/selection-after-insert-list.html
copy to LayoutTests/editing/execCommand/selection-after-switch-type-of-listitem.html
index 1d00ca1208d928171b57056460fb2556c503faf0..d136da2ea1dd7431d289569dcd00f345a7bb45c6 100644
--- a/LayoutTests/editing/execCommand/selection-after-insert-list.html
+++ b/LayoutTests/editing/execCommand/selection-after-switch-type-of-listitem.html
@@ -1,17 +1,18 @@
<script src="../../resources/dump-as-markup.js"></script>
<div id="test" contenteditable>
<ul>
- <li id="first">ABC</li>
- <li id="second">DEF</li>
+ <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.setStart(document.getElementById('second').firstChild, 0);
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.");
+document.execCommand('InsertOrderedList');
+document.execCommand('InsertUnOrderedList');
+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