| <!DOCTYPE HTML> |
| <html> |
| <body> |
| <p>Tests that reparenting media elements also reparents ActiveDOMObject.</p> |
| <iframe src="resources/media-frame.html"></iframe> |
| <script src="resources/activedomobject-test.js"></script> |
| <script> |
| function runTest() |
| { |
| window.iframe = document.querySelector('iframe').contentDocument; |
| |
| log('Before Reparenting'); |
| shouldBe('internals.contextLifecycleStateObserverObjectCount(document)', 0); |
| shouldBe('internals.contextLifecycleStateObserverObjectCount(iframe)', 1); |
| |
| document.body.appendChild(window.iframe.querySelector('video')); |
| |
| log('After Reparenting'); |
| shouldBe('internals.contextLifecycleStateObserverObjectCount(document)', 1); |
| shouldBe('internals.contextLifecycleStateObserverObjectCount(iframe)', 0); |
| } |
| </script> |
| </body> |
| </html> |