Simplify storage event dispatch somewhat
[WebKit-https.git] / LayoutTests / editing / pasteboard / 5247341.html
1 <p>This tests for a bug where newlines would not be preserved during copy/paste. Below you should see two paragaphs containing "Hello World!" and an empty third paragraph with the caret in it.</p>
2 <div id="root" contenteditable="true">Hello World!<div id="div"><br></div></div>
3
4 <script>
5 root = document.getElementById("root");
6 root.focus();
7 document.execCommand("SelectAll");
8 document.execCommand("Copy");
9
10 selection = window.getSelection();
11 div = document.getElementById("div");
12 selection.setPosition(div, 0);
13 document.execCommand("Paste");
14 </script>