4 <div contenteditable
id=
"test">
5 <span style=
"display:block"><b>This is a paragraph.
</b></span>
6 <span style=
"display:block"><b>This is another paragraph.
</b></span>
8 <script src=
"../editing.js"></script>
9 <script src=
"../../resources/dump-as-markup.js"></script>
12 Markup
.description('This is a test case for the fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7904.\n'+
13 'ReplaceSelectionCommand used to guess whether or not nodes in the fragment to be pasted were blocks. It now knows for sure.\n'+
14 'Before the fix, ReplaceSelectionCommand blew away content of the div below after copy/pasting it over itself.\n'+
15 'The following two results must be visually identical except for the caret.');
17 var test
= document
.getElementById('test');
19 window
.getSelection().collapse(test
, 0);
21 Markup
.dump(test
, 'before');
23 extendSelectionForwardByLineCommand();
24 extendSelectionForwardByWordCommand();
28 Markup
.dump(test
, 'after');