Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-controls-with-mutation-event-handler.html
blob5a1aebcdf8038dd2c890ed1a302840c1c0e828c7
1 <html>
2 <head>
3 <title>&lt;video&gt; controls with mutation event handler</title>
5 <style type="text/css" media="screen">
6 body { background: #cccccc; }
7 video { background: yellow; border: 1px solid black; border-bottom: none; }
8 </style>
10 <script>
11 function runTest()
13 if (window.testRunner)
14 testRunner.dumpAsText();
16 document.body.addEventListener("DOMSubtreeModified", function () { }, false);
18 var video = document.createElement('video');
19 video.setAttribute('id', 'vid');
20 video.setAttribute('width', '320');
21 video.setAttribute('height', '240');
22 video.setAttribute('autoplay', '');
23 video.setAttribute('controls', '');
24 var paragraph = document.createElement('p');
25 paragraph.appendChild(video);
26 document.body.appendChild(paragraph);
28 paragraph = document.createElement('p');
29 paragraph.appendChild(document.createTextNode("SUCCESS: The test ran without crashing"));
30 document.body.appendChild(paragraph);
32 </script>
33 </head>
35 <body onload="runTest()">
36 <p>This tests that we don't crash while creating a video element while a DOMSubtreeModified even handler is registered.</p>
37 <p>If you can see the movie below, the test passed.</p>
38 </body>
39 </html>