| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| function moveIframe(svgDoc) { |
| svgElement = svgDoc.documentElement; |
| const iframe = document.createElement('iframe'); |
| svgDoc.documentElement.appendChild(iframe); |
| iframe.contentWindow.onunload = () => { |
| document.body.appendChild(svgElement); |
| const content = `<svg xmlns="http://www.w3.org/2000/svg"><script>parent.moveIframe(document);<\/script><element a="1" a="2"/></svg>`; |
| const iframe = document.createElement('iframe'); |
| iframe.src = URL.createObjectURL(new Blob([content], {type: 'text/xml'})); |
| document.documentElement.appendChild(iframe); |
| let test = async_test('An element removed by the adoption agency algorithm must not be inserted if it had been inserted elsewhere'); |
| assert_equals(svgElement.parentNode, document.body); |