4 <p id=
"description">This tests for a bug where newlines would not be preserved during copy/paste. Below you should see two paragraphs containing
"Hello World!" and an empty third paragraph with the caret in it.
</p>
5 <div id=
"root" contenteditable=
"true">Hello World!
<div id=
"div"><br></div></div>
6 <script src=
"../../resources/dump-as-markup.js"></script>
9 Markup
.description(document
.getElementById('description').textContent
);
11 root
= document
.getElementById("root");
13 document
.execCommand("SelectAll");
14 document
.execCommand("Copy");
16 Markup
.dump(root
, 'Before copy and paste');
18 selection
= window
.getSelection();
19 div
= document
.getElementById("div");
20 selection
.collapse(div
, 0);
21 document
.execCommand("Paste");
23 Markup
.dump(root
, 'After copy and paste');