[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / audio-play-event.html
1 <html>
2     <head>
3         <title>'play' event</title>
4         <script src=media-file.js></script>
5         <script src=video-test.js></script>
6
7         <script>
8             function start()
9             {
10                 mediaElement = new Audio();
11                 waitForEvent('error');
12                 waitForEvent('loadedmetadata');
13                 waitForEvent('canplay');
14                 waitForEvent('play');
15                 waitForEvent('playing', function() { endTest(); });
16                 run("mediaElement.src = findMediaFile('audio', 'content/test')");
17                 run("mediaElement.volume = 1");
18                 run("mediaElement.play()");
19             }    
20         </script>
21     </head>
22
23     <body onload="start()">
24     <p>Test that a 'play' event listener is triggered when fired by a new audio element.</p>
25     </body>
26 </html>
27