| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 4 (Please avoid writing new tests using video-test.js) --> |
| 3 <script src=../../media-resources/video-test.js></script> | 5 <script src=../../media-resources/video-test.js></script> |
| 4 <script src=../../media-resources/media-file.js></script> | 6 <script src=../../media-resources/media-file.js></script> |
| 5 <script> | 7 <script> |
| 6 var frame; | 8 var frame; |
| 7 function loadMediaFrame() | 9 function loadMediaFrame() |
| 8 { | 10 { |
| 9 var movie = findMediaFile('video', 'test'); | 11 var movie = findMediaFile('video', 'test'); |
| 10 var type = mimeTypeForExtension(movie.split('.').pop()); | 12 var type = mimeTypeForExtension(movie.split('.').pop()); |
| 11 frame = document.createElement('iframe'); | 13 frame = document.createElement('iframe'); |
| 12 frame.addEventListener('load', function () { | 14 frame.addEventListener('load', function () { |
| 13 testExpected("frame.contentDocument.getElementsByTagName('vi
deo')[0].error", null); | 15 testExpected("frame.contentDocument.getElementsByTagName('vi
deo')[0].error", null); |
| 14 endTest(); | 16 endTest(); |
| 15 }); | 17 }); |
| 16 waitForEventAndFail('error'); | 18 waitForEventAndFail('error'); |
| 17 waitForEventAndEnd('canplay'); | 19 waitForEventAndEnd('canplay'); |
| 18 frame.src = 'resources/video-check-useragent.php?name=' + movie
+ '&type=' + type; | 20 frame.src = 'resources/video-check-useragent.php?name=' + movie
+ '&type=' + type; |
| 19 document.body.appendChild(frame); | 21 document.body.appendChild(frame); |
| 20 } | 22 } |
| 21 </script> | 23 </script> |
| 22 </head> | 24 </head> |
| 23 | 25 |
| 24 <body onload="loadMediaFrame()"> | 26 <body onload="loadMediaFrame()"> |
| 25 <br> | 27 <br> |
| 26 Tests that a media document can open a media URL with an ambiguous exten
sion. | 28 Tests that a media document can open a media URL with an ambiguous exten
sion. |
| 27 <br> | 29 <br> |
| 28 </body> | 30 </body> |
| 29 </html> | 31 </html> |
| OLD | NEW |