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