| 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 function loadMediaFrame() | 8 function loadMediaFrame() |
| 7 { | 9 { |
| 8 findMediaElement(); | 10 findMediaElement(); |
| 9 | 11 |
| 10 var movie = findMediaFile('video', 'test'); | 12 var movie = findMediaFile('video', 'test'); |
| 11 var type = mimeTypeForExtension(movie.split('.').pop()); | 13 var type = mimeTypeForExtension(movie.split('.').pop()); |
| 12 var frame = document.createElement('iframe'); | 14 var frame = document.createElement('iframe'); |
| 13 | 15 |
| 14 frame.width = 0; | 16 frame.width = 0; |
| 15 frame.height = 0; | 17 frame.height = 0; |
| 16 frame.addEventListener('load', function () { | 18 frame.addEventListener('load', function () { |
| 17 video.src = 'http://127.0.0.1:8000/media/resources/load-vide
o.php?name=' + movie + '&type=' + type; | 19 video.src = 'http://127.0.0.1:8000/media/resources/load-vide
o.php?name=' + movie + '&type=' + type; |
| 18 | 20 |
| 19 waitForEventAndFail('error'); | 21 waitForEventAndFail('error'); |
| 20 waitForEventAndEnd('canplay'); | 22 waitForEventAndEnd('canplay'); |
| 21 }); | 23 }); |
| 22 | 24 |
| 23 frame.src = "data:text/html,<b>test</b>"; | 25 frame.src = "data:text/html,<b>test</b>"; |
| 24 document.body.appendChild(frame); | 26 document.body.appendChild(frame); |
| 25 } | 27 } |
| 26 </script> | 28 </script> |
| 27 </head> | 29 </head> |
| 28 | 30 |
| 29 <body onload="loadMediaFrame()"> | 31 <body onload="loadMediaFrame()"> |
| 30 <video controls></video> | 32 <video controls></video> |
| 31 <br> | 33 <br> |
| 32 Tests that WebKit is able to open a media file specified with a query ur
l. | 34 Tests that WebKit is able to open a media file specified with a query ur
l. |
| 33 </body> | 35 </body> |
| 34 </html> | 36 </html> |
| OLD | NEW |