Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / media-document.html
blobcd2d9cbc791c859066dfbcad60a6c9e6d03f01b6
1 <html>
2 <head>
3 <script src=../../media-resources/video-test.js></script>
4 <script src=../../media-resources/media-file.js></script>
5 <script>
6 var frame;
7 function loadMediaFrame()
9 var movie = findMediaFile('video', 'test');
10 var type = mimeTypeForExtension(movie.split('.').pop());
11 frame = document.createElement('iframe');
12 frame.addEventListener('load', function () {
13 testExpected("frame.contentDocument.getElementsByTagName('video')[0].error", null);
14 endTest();
15 });
16 waitForEventAndFail('error');
17 waitForEventAndEnd('canplay');
18 frame.src = 'resources/video-check-useragent.php?name=' + movie + '&type=' + type;
19 document.body.appendChild(frame);
21 </script>
22 </head>
24 <body onload="loadMediaFrame()">
25 <br>
26 Tests that a media document can open a media URL with an ambiguous extension.
27 <br>
28 </body>
29 </html>