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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/undo/redo-selection-modify-crash.html

Issue 2680943004: Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2014-02-14T23:34:22 Update TestExpectation to include extend-{0,2,4}0.html and selectAllChildren.html Created 3 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/testharness.js"></script> 1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script> 2 <script src="../../resources/testharnessreport.js"></script>
3 <script src="../assert_selection.js"></script> 3 <script src="../assert_selection.js"></script>
4 <div id="log"></div> 4 <div id="log"></div>
5 <script> 5 <script>
6 test(() => { 6 test(() => {
7 assert_selection( 7 assert_selection(
8 '<div contenteditable>|foo<br><i>bar</i></div>', 8 '<div contenteditable>|foo<br><i>bar</i></div>',
9 selection => { 9 selection => {
10 // Make base/extent and start/end different. 10 // Make base/extent and start/end different.
11 selection.modify('extend', 'forward', 'word'); 11 selection.modify('extend', 'forward', 'word');
12 selection.document.execCommand('justifyLeft'); 12 selection.document.execCommand('justifyLeft');
13 selection.document.execCommand('undo'); 13 selection.document.execCommand('undo');
14 // Remove an anchor node for extent position of redo 14 // Remove an anchor node for extent position of redo
15 selection.document.querySelector('i').remove(); 15 selection.document.querySelector('i').remove();
16 selection.document.execCommand('redo'); 16 selection.document.execCommand('redo');
17 }, 17 },
18 navigator.platform.indexOf('Mac') == 0 18 '<div contenteditable>^foo|<br></div>');
19 ? '<div contenteditable>^foo|<br></div>'
20 : '<div contenteditable>^foo<br>|</div>');
21 }); 19 });
22 </script> 20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698