Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / video-load-with-userpass.html
blobb0406165caee5888402980f92367105749d49dc6
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://user:pass@127.0.0.1:8080/media/resources/video-check-userpass.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 does not include authorization information.
37 </body>
38 </html>