2009-08-26 Eric Carlson <eric.carlson@apple.com>
[WebKit-https.git] / LayoutTests / media / audio-play-event.html
1 <html>
2     <head>
3         <title>'play' event</title>
4         <script src=video-test.js></script>
5
6         <script>
7             function start()
8             {
9                 mediaElement = new Audio();
10                 waitForEvent('error');
11                 waitForEvent('loadedmetadata');
12                 waitForEvent('canplay');
13                 waitForEvent('canplaythrough');
14                 waitForEvent('play');
15                 waitForEvent('playing', function() { endTest(); });
16                 run("mediaElement.src = 'content/silence.mpg'");
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