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

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: 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.html b/LayoutTests/editing/execCommand/selection-after-insert-list-2.html
similarity index 55%
copy from LayoutTests/editing/execCommand/selection-after-insert-list.html
copy to LayoutTests/editing/execCommand/selection-after-insert-list-2.html
index 1d00ca1208d928171b57056460fb2556c503faf0..a78f51151a2fe44d714a9c80de43f2d62f82ead9 100644
--- a/LayoutTests/editing/execCommand/selection-after-insert-list.html
+++ b/LayoutTests/editing/execCommand/selection-after-insert-list-2.html
@@ -1,17 +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>
+<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('first').firstChild, 2);
-range.setEnd(document.getElementById('second').firstChild, 3);
+range.setStart(document.getElementById('startSelection'), 0);
+range.setEnd(document.getElementById('endSelection'), 1);
selection.addRange(range);
-document.execCommand('InsertOrderedList', false, null);
+document.execCommand('InsertOrderedList', false, true);
yosin_UTC9 2014/02/27 01:38:40 We don't need to have |false| and |true|. "InsertO
arpitab_ 2014/02/27 06:56:11 Done.
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