[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / video-controls-with-mutation-event-handler.html
1 <html>
2     <head>
3         <title>&lt;video&gt; controls with mutation event handler</title>
4
5         <style type="text/css" media="screen">
6             body { background: #cccccc; }
7             video { background: yellow; border: 1px solid black; border-bottom: none; }
8         </style>
9
10         <script>
11             function runTest()
12             {
13                 if (window.testRunner)
14                     testRunner.dumpAsText();
15
16                 document.body.addEventListener("DOMSubtreeModified", function () { }, false);
17
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);
27
28                 paragraph = document.createElement('p');
29                 paragraph.appendChild(document.createTextNode("SUCCESS: The test ran without crashing"));
30                 document.body.appendChild(paragraph);
31             }
32         </script>
33     </head>
34
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>