OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <body> | 3 <body> |
4 | 4 |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 | 6 |
7 <script> | 7 <script> |
8 description('Should not be able to create an iframe with a loaded contentDocumen
t that is not in the document tree.'); | 8 description('Should not be able to create an iframe with a loaded contentDocumen
t that is not in the document tree.'); |
9 | 9 |
10 container = document.body.appendChild(document.createElement("div")); | 10 container = document.body.appendChild(document.createElement("div")); |
11 helperDiv = container.appendChild(document.createElement("div")); | 11 helperDiv = container.appendChild(document.createElement("div")); |
12 helperFrame = container.appendChild(document.createElement("iframe")); | 12 helperFrame = container.appendChild(document.createElement("iframe")); |
13 | 13 |
14 helperFrame.contentWindow.onunload = function() { | 14 helperFrame.contentWindow.onunload = function() { |
15 shadowRoot = helperDiv.createShadowRoot(); | 15 shadowRoot = helperDiv.createShadowRoot(); |
16 innerFrame = shadowRoot.appendChild(document.createElement("iframe")); | 16 innerFrame = shadowRoot.appendChild(document.createElement("iframe")); |
17 }; | 17 }; |
18 | 18 |
19 document.body.removeChild(container); | 19 document.body.removeChild(container); |
20 | 20 |
21 shouldBe('innerFrame.contentDocument', 'null'); | 21 shouldBe('innerFrame.contentDocument', 'null'); |
22 </script> | 22 </script> |
23 | 23 |
OLD | NEW |