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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/merge-after-delete-1.html

Issue 2182013002: Convert editing/pasteboard/merge-after-delete*.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-27T10:40:52 Created 4 years, 4 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>
2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <style>
6 div {
7 border: 1px solid black;
8 margin: 2px;
9 }
10 </style>
11 <p>When ReplaceSelectionCommand deletes the current selection, it should request that the deletion do a merge in some cases (normally, though, it should ask tha t a merge not be done, because a merge will cause information about block nestin g to be lost). It wasn't requesting a merge in cases where it should have.</p>
12 <p>The failing case is where the incoming fragment has more than one block, and the selection being pasted into ends at the end of a paragraph. Any time the se lection being pasted into ends at the end of a paragraph, deleting will leave le ave a) a br or b) an empty block at the end of the deleted selection. So, not m erging will leave an extraneous empty line or a collapsed block after the paste operation.</p>
13 <div id="test" contenteditable="true"><div style="border: 1px solid red;">bar</d iv><div style="border: 1px solid blue;">bar<br></div></div>
14
15 <script>
16 var s = window.getSelection();
17 var e = document.getElementById("test");
18
19 s.collapse(e, 0);
20 s.modify("move", "forward", "character");
21 s.modify("extend", "forward", "line");
22 s.modify("extend", "forward", "line");
23 document.execCommand("InsertHTML", false, "<div>foo</div><div>bar</div>");
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698