| testRunner.dumpEditingCallbacks(); |
| <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> |
| <div id="paste" contenteditable="true"></div> |
| <img id="start" src="../resources/abe.png"> |
| <select id="end"><optgroup><option>1</option><option>2</option><option>3</option></optgroup></select> |
| var start = document.getElementById("start"); |
| var end = document.getElementById("end"); |
| var s = window.getSelection(); |
| s.setBaseAndExtent(start, 0, end, end.childNodes.length); |
| document.execCommand("Copy"); |
| s.setPosition(document.getElementById("paste"), 0); |
| document.execCommand("Paste"); |
| const pastedImageElement = document.querySelector('#paste img'); |
| if (pastedImageElement.complete) |
| pastedImageElement.onload = finish; |
| window.testRunner.notifyDone(); |
| window.testRunner.waitUntilDone(); |