4 <script src=
"../resources/js-test.js"></script>
9 description("Verify that removing a video element from the DOM does not crash.");
11 window
.jsTestIsAsync
= true;
13 if (window
.testRunner
) {
14 testRunner
.dumpAsText();
15 testRunner
.waitUntilDone();
19 if (!window
.internals
) {
23 var video
= document
.getElementById('v');
24 var videoShadow
= window
.internals
.shadowRoot(video
);
25 traverse(videoShadow
);
27 document
.body
.removeChild(video
);
31 function traverse(node
) {
35 Array
.prototype.forEach
.call(node
.attributes
, function (n
) { node
[n
&& n
.localName
] = 2; });
37 Array
.prototype.forEach
.call(node
.childNodes
, traverse
);
38 if (node
.localName
== 'input')
39 traverse(window
.internals
.shadowRoot(node
));
41 window
.onload
= runTest
;