| OLD | NEW |
| 1 x+<!DOCTYPE html> | 1 x+<!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("This test ensure that the shadow related elements are instantiated
even inside frameless documents."); | 8 description("This test ensure that the shadow related elements are instantiated
even inside frameless documents."); |
| 9 | 9 |
| 10 var doc = document.implementation.createHTMLDocument(); | 10 var doc = document.implementation.createHTMLDocument(); |
| 11 var container = doc.createElement("span"); | 11 var container = doc.createElement("span"); |
| 12 doc.body.appendChild(container); | 12 doc.body.appendChild(container); |
| 13 container.innerHTML = "<content id='contentElement'></content><shadow id='shadow
Element'></shadow>"; | 13 container.innerHTML = "<content id='contentElement'></content><shadow id='shadow
Element'></shadow>"; |
| 14 | 14 |
| 15 var content = container.querySelector("#contentElement"); | 15 var content = container.querySelector("#contentElement"); |
| 16 var shadow = container.querySelector("#shadowElement"); | 16 var shadow = container.querySelector("#shadowElement"); |
| 17 | 17 |
| 18 debug("Testing on the frame-less document."); | 18 debug("Testing on the frame-less document."); |
| 19 shouldBe("window.HTMLContentElement", "content.constructor"); | 19 shouldBe("window.HTMLContentElement", "content.constructor"); |
| 20 shouldBe("window.HTMLShadowElement", "shadow.constructor"); | 20 shouldBe("window.HTMLShadowElement", "shadow.constructor"); |
| 21 | 21 |
| 22 debug("Moving to the main document."); | 22 debug("Moving to the main document."); |
| 23 document.body.appendChild(container); | 23 document.body.appendChild(container); |
| 24 shouldBe("window.HTMLContentElement", "content.constructor"); | 24 shouldBe("window.HTMLContentElement", "content.constructor"); |
| 25 shouldBe("window.HTMLShadowElement", "shadow.constructor"); | 25 shouldBe("window.HTMLShadowElement", "shadow.constructor"); |
| 26 | 26 |
| 27 </script> | 27 </script> |
| 28 <script src="../../js/resources/js-test-post.js"></script> | |
| 29 </body> | 28 </body> |
| 30 </html> | 29 </html> |
| OLD | NEW |