Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / 4242293.html
1 <script>
2 if (window.testRunner)
3      testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests for a bug in createMarkup (markup for ancestors of the start of the selection wasn't being added to the pasteboard).  You should see the same thing in both regions below.</p>
6 <p><b>This demonstrates a bug: 'foo' is pulled out of its bordered block.</b></p>
7 <div id="copy" contenteditable="true"><div style="margin: 5px; border: 1px solid red;">foo<div style="margin: 5px; border: 1px solid blue;">bar</div></div>baz</div>
8
9 <div id="paste" contenteditable="true"></div>
10
11 <script>
12 window.getSelection().collapse(document.getElementById("copy"));
13 document.execCommand("SelectAll");
14 document.execCommand("Copy");
15 window.getSelection().collapse(document.getElementById("paste"));
16 document.execCommand("Paste");
17 </script>