Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / 4641033.html
blob34219f7df3680a83e882e14825da653f03b3ee2b
1 <script>
2 if (window.testRunner)
3 testRunner.dumpEditingCallbacks();
4 </script>
5 <p>This tests for a bug when creating markup for a selection that contained unrendered nodes with children. You should see a picture of abe followed by a select box.</p>
6 <div id="paste" contenteditable="true"></div>
8 <img id="start" src="../resources/abe.png">
9 <select id="end"><optgroup><option>1</option><option>2</option><option>3</option></optgroup></select>
10 </select>
11 <script>
12 function runTest() {
13 var start = document.getElementById("start");
14 var end = document.getElementById("end");
16 var s = window.getSelection();
17 s.setBaseAndExtent(start, 0, end, end.childNodes.length);
19 document.execCommand("Copy");
21 s.collapse(document.getElementById("paste"), 0);
22 document.execCommand("Paste");
24 if (window.testRunner)
25 window.testRunner.notifyDone();
28 if (window.testRunner)
29 window.testRunner.waitUntilDone();
30 window.setTimeout(runTest, 100);
32 </script>