OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../resources/js-test.js"></script> | |
5 </head> | |
6 <body> | |
7 <video id="v"></video> | |
8 <script> | |
9 description("Verify that removing a video element from the DOM does not crash.") ; | |
10 | |
11 window.jsTestIsAsync = true; | |
12 | |
13 if (window.testRunner) { | |
14 testRunner.dumpAsText(); | |
15 testRunner.waitUntilDone(); | |
16 } | |
17 | |
18 function runTest() { | |
19 if (!window.internals) { | |
20 finishJSTest(); | |
21 return; | |
22 } | |
23 var video = document.getElementById('v'); | |
24 var videoShadow = window.internals.shadowRoot(video); | |
25 traverse(videoShadow); | |
26 | |
27 document.body.removeChild(video); | |
28 finishJSTest(); | |
29 } | |
30 | |
31 function traverse(node) { | |
32 if (!node) | |
33 return; | |
34 if (node.attributes) | |
35 Array.prototype.forEach.call(node.attributes, function (n) { node[n && n .localName] = 2; }); | |
philipj_slow
2015/02/27 10:35:29
This looks a bit cryptic to me. Is this to take co
sof
2015/02/27 10:39:54
It is a reduction from a fuzzer's doing; iterating
philipj_slow
2015/02/27 11:04:33
Does it matter if node.foo is set or if the callba
sof
2015/02/27 11:16:34
It matters, involving node.max in particular..but
| |
36 if (node.childNodes) | |
37 Array.prototype.forEach.call(node.childNodes, traverse); | |
38 if (node.localName == 'input') | |
philipj_slow
2015/02/27 10:35:29
Could this not be made unconditional given the nul
sof
2015/02/27 10:39:54
It could, but I don't see the value of making the
philipj_slow
2015/02/27 11:04:33
Very well, it looked to me like it was already try
| |
39 traverse(window.internals.shadowRoot(node)); | |
40 } | |
41 window.onload = runTest; | |
42 </script> | |
43 </html> | |
OLD | NEW |