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> |