Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / video-useragent.html
blobd79da8aad40af89bcbe8f1ba46949da1a8c724b1
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 function loadMediaFrame()
8 findMediaElement();
10 var movie = findMediaFile('video', 'test');
11 var type = mimeTypeForExtension(movie.split('.').pop());
12 var frame = document.createElement('iframe');
13 frame.width = 0;
14 frame.height = 0;
15 frame.addEventListener('load', function () {
16 source = document.getElementById('source');
17 source.src = 'http://127.0.0.1:8000/media/resources/video-check-useragent.php?name=' + movie + '&type=' + type;
18 source.type = type;
20 waitForEventAndFail('error');
21 waitForEventAndEnd('canplay');
22 video.load();
23 });
25 frame.src = "data:text/html,<b>test</b>";
26 document.body.appendChild(frame);
28 </script>
29 </head>
31 <body onload="loadMediaFrame()">
32 <video id="video">
33 <source id="source">
34 </video>
35 <br>
36 Tests that the media player sends the WebKit User Agent string when requesting a media file.
37 </body>
38 </html>