| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>'play' event</title> | 3 <title>'play' event</title> |
| 4 <script src=media-file.js></script> | 4 <script src=media-file.js></script> |
| 5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 6 (Please avoid writing new tests using video-test.js) --> |
| 5 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
| 6 | 8 |
| 7 <script> | 9 <script> |
| 8 function start() | 10 function start() |
| 9 { | 11 { |
| 10 mediaElement = new Audio(); | 12 mediaElement = new Audio(); |
| 11 waitForEvent('error'); | 13 waitForEvent('error'); |
| 12 waitForEvent('loadedmetadata'); | 14 waitForEvent('loadedmetadata'); |
| 13 waitForEvent('canplay'); | 15 waitForEvent('canplay'); |
| 14 waitForEvent('play'); | 16 waitForEvent('play'); |
| 15 waitForEvent('playing', function() { endTest(); }); | 17 waitForEvent('playing', function() { endTest(); }); |
| 16 run("mediaElement.src = findMediaFile('audio', 'content/test')")
; | 18 run("mediaElement.src = findMediaFile('audio', 'content/test')")
; |
| 17 run("mediaElement.volume = 1"); | 19 run("mediaElement.volume = 1"); |
| 18 run("mediaElement.play()"); | 20 run("mediaElement.play()"); |
| 19 } | 21 } |
| 20 </script> | 22 </script> |
| 21 </head> | 23 </head> |
| 22 | 24 |
| 23 <body onload="start()"> | 25 <body onload="start()"> |
| 24 <p>Test that a 'play' event listener is triggered when fired by a new audio
element.</p> | 26 <p>Test that a 'play' event listener is triggered when fired by a new audio
element.</p> |
| 25 </body> | 27 </body> |
| 26 </html> | 28 </html> |
| 27 | |
| OLD | NEW |