| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src=../../media-resources/video-test.js></script> | 3 <script src=../../media-resources/video-test.js></script> |
| 4 <script src=../../media-resources/media-file.js></script> | 4 <script src=../../media-resources/media-file.js></script> |
| 5 <script> | 5 <script> |
| 6 function loadMediaFrame() | 6 function loadMediaFrame() |
| 7 { | 7 { |
| 8 findMediaElement(); | 8 findMediaElement(); |
| 9 | 9 |
| 10 var movie = findMediaFile('video', 'test'); | 10 var movie = findMediaFile('video', 'test'); |
| 11 var type = mimeTypeForExtension(movie.split('.').pop()); | 11 var type = mimeTypeForExtension(movie.split('.').pop()); |
| 12 var frame = document.createElement('iframe'); | 12 var frame = document.createElement('iframe'); |
| 13 frame.width = 0; | 13 frame.width = 0; |
| 14 frame.height = 0; | 14 frame.height = 0; |
| 15 frame.addEventListener('load', function () { | 15 frame.addEventListener('load', function () { |
| 16 source = document.getElementById('source'); | 16 source = document.getElementById('source'); |
| 17 source.src = 'http://127.0.0.1:8000/media/resources/vide
o-check-useragent.php?name=' + movie + '&type=' + type; | 17 source.src = 'http://user:pass@127.0.0.1:8080/media/reso
urces/video-check-userpass.php?name=' + movie + '&type=' + type; |
| 18 source.type = type; | 18 source.type = type; |
| 19 | 19 |
| 20 waitForEventAndFail('error'); | 20 waitForEventAndFail('error'); |
| 21 waitForEventAndEnd('canplay'); | 21 waitForEventAndEnd('canplay'); |
| 22 video.load(); | 22 video.load(); |
| 23 }); | 23 }); |
| 24 | 24 |
| 25 frame.src = "data:text/html,<b>test</b>"; | 25 frame.src = "data:text/html,<b>test</b>"; |
| 26 document.body.appendChild(frame); | 26 document.body.appendChild(frame); |
| 27 } | 27 } |
| 28 </script> | 28 </script> |
| 29 </head> | 29 </head> |
| 30 | 30 |
| 31 <body onload="loadMediaFrame()"> | 31 <body onload="loadMediaFrame()"> |
| 32 <video id="video"> | 32 <video id="video"> |
| 33 <source id="source"> | 33 <source id="source"> |
| 34 </video> | 34 </video> |
| 35 <br> | 35 <br> |
| 36 Tests that the media player sends the WebKit User Agent string when requ
esting a media file. | 36 Tests that the media player does not include authorization information. |
| 37 </body> | 37 </body> |
| 38 </html> | 38 </html> |
| OLD | NEW |