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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <script src="../../resources/dump-as-markup.js"></script> 1 <script src="../../resources/dump-as-markup.js"></script>
2 <div id="test" contenteditable> 2 <div id="test" contenteditable>
3 <ul> 3 <p id="startSelection">A</p>
4 <li id="first">ABC</li> 4 <p>B</p>
5 <li id="second">DEF</li> 5 <p id="endSelection">C</p>
6 </ul> 6 <p>This should not be selected.</p>
7 </div> 7 </div>
8 <script> 8 <script>
9 var selection = window.getSelection(); 9 var selection = window.getSelection();
10 var range = document.createRange(); 10 var range = document.createRange();
11 range.setStart(document.getElementById('first').firstChild, 2); 11 range.setStart(document.getElementById('startSelection'), 0);
12 range.setEnd(document.getElementById('second').firstChild, 3); 12 range.setEnd(document.getElementById('endSelection'), 1);
13 selection.addRange(range); 13 selection.addRange(range);
14 document.execCommand('InsertOrderedList', false, null); 14 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.
15 Markup.description("This tests verifies that the selection is properly reset aft er executing the command."); 15 Markup.description("This tests verifies that the selection is properly reset aft er executing the command.");
16 Markup.dump('test'); 16 Markup.dump('test');
17 </script> 17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698