OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <body onload="start()"> | 3 <body onload="start()"> |
| 4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 5 (Please avoid writing new tests using video-test.js) --> |
4 <script src=../../media-resources/video-test.js></script> | 6 <script src=../../media-resources/video-test.js></script> |
5 <script src=../../media-resources/media-file.js></script> | 7 <script src=../../media-resources/media-file.js></script> |
6 <script> | 8 <script> |
7 waitForEvent('error', function() { | 9 waitForEvent('error', function() { |
8 failTest("error: " + JSON.stringify(video.error)); | 10 failTest("error: " + JSON.stringify(video.error)); |
9 }); | 11 }); |
10 | 12 |
11 waitForEvent('playing', function() { | 13 waitForEvent('playing', function() { |
12 try { | 14 try { |
13 var ctx = document.getElementsByTagName('canvas')[0].getContext("2
d"); | 15 var ctx = document.getElementsByTagName('canvas')[0].getContext("2
d"); |
(...skipping 11 matching lines...) Expand all Loading... |
25 document.body.appendChild(mediaElement); | 27 document.body.appendChild(mediaElement); |
26 var mediaFile = findMediaFile("video", "../../media/resources/test")
; | 28 var mediaFile = findMediaFile("video", "../../media/resources/test")
; |
27 var type = mimeTypeForExtension(mediaFile.split('.').pop()); | 29 var type = mimeTypeForExtension(mediaFile.split('.').pop()); |
28 video.src = "http://localhost:8080/security/resources/video-cross-or
igin-allow.php?no-preflight&name=" + mediaFile + "&type=" + type; | 30 video.src = "http://localhost:8080/security/resources/video-cross-or
igin-allow.php?no-preflight&name=" + mediaFile + "&type=" + type; |
29 video.play(); | 31 video.play(); |
30 } | 32 } |
31 </script> | 33 </script> |
32 <canvas></canvas> | 34 <canvas></canvas> |
33 </body> | 35 </body> |
34 </head> | 36 </head> |
OLD | NEW |