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

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

Issue 2120223002: Make redo command not to set invalid selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-04T15:06:28 Created 4 years, 5 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
(Empty)
1 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script>
3 <script src="../assert_selection.js"></script>
4 <div id="log"></div>
5 <script>
6 test(() => {
7 assert_selection(
8 '<div contenteditable>|foo<br><i>bar</i></div>',
9 selection => {
10 // Make base/extent and start/end different.
11 selection.modify('extend', 'forward', 'word');
12 selection.document.execCommand('justifyLeft');
13 selection.document.execCommand('undo');
14 // Remove an anchor node for extent position of redo
15 selection.document.querySelector('i').remove();
16 selection.document.execCommand('redo');
17 },
18 navigator.platform.indexOf('Mac') == 0
19 ? '<div contenteditable>^foo|<br></div>'
20 : '<div contenteditable>^foo<br>|</div>');
21 });
22 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | third_party/WebKit/Source/core/editing/Editor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698