| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src=media-file.js></script> |
| <script src=video-test.js></script> |
| |
| <script> |
| var promise; |
| function start() |
| { |
| findMediaElement(); |
| run('mediaElement.src = findMediaFile("video", "content/test")'); |
| run('mediaElement.play()'); |
| waitForEventOnce('playing', playing); |
| } |
| |
| function playing() |
| { |
| run('mediaElement.play().then(promiseResolved).catch(failTest)'); |
| } |
| |
| function promiseResolved() |
| { |
| logResult(true, "Promise resolved."); |
| endTest(); |
| } |
| </script> |
| </head> |
| |
| <body onload="start()"> |
| |
| <video></video> |
| |
| </body> |
| </html> |