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

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

Issue 181103004: Fixing crash when executing ApplyStyle command. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing review comments Created 6 years, 10 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-insert-list-2.html
diff --git a/LayoutTests/editing/execCommand/selection-after-insert-list-2.html b/LayoutTests/editing/execCommand/selection-after-insert-list-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..ec8e159893f6a974ec883b75dcbb00ccf4eca752
--- /dev/null
+++ b/LayoutTests/editing/execCommand/selection-after-insert-list-2.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/dump-as-markup.js"></script>
+<div id="test" contenteditable>
+<p id="startSelection">A</p>
+<p>B</p>
+<p id="endSelection">C</p>
+<p>This should not be selected.</p>
+</div>
+<script>
+var selection = window.getSelection();
+var range = document.createRange();
+range.setStart(document.getElementById('startSelection'), 0);
+range.setEnd(document.getElementById('endSelection'), 1);
+selection.addRange(range);
+document.execCommand('InsertOrderedList');
+Markup.description("This tests verifies that the selection is properly reset after executing the command.");
+Markup.dump('test');
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698