| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Video element src attribute must match src list - positive test</titl
e> | 4 <title>Video element src attribute must match src list - positive test</titl
e> |
| 5 <script src='/resources/testharness.js'></script> | 5 <script src='/resources/testharness.js'></script> |
| 6 <script src='/resources/testharnessreport.js'></script> | 6 <script src='/resources/testharnessreport.js'></script> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <h1>Video element in media-src list - redirect test</h1> | 9 <h1>Video element in media-src list - redirect test</h1> |
| 10 <div id='log'></div> | 10 <div id='log'></div> |
| 11 | 11 |
| 12 <p>This test tests a buggy interaction in Chrome 46. Two hosts (self and www2
) are both allowed | 12 <p>This test tests a buggy interaction in Chrome 46. Two hosts (self and www2
) are both allowed |
| 13 as media-src, but only one (self) is allowed for connect-src. If a video sr
c starts on | 13 as media-src, but only one (self) is allowed for connect-src. If a video sr
c starts on |
| 14 an allowed host (self), and is redirected to another allowed media-src host,
it should succeed. But a bug | 14 an allowed host (self), and is redirected to another allowed media-src host,
it should succeed. But a bug |
| 15 causes the redirect to be done in a fetch context to which connect-src is be
ing applied instead, so | 15 causes the redirect to be done in a fetch context to which connect-src is be
ing applied instead, so |
| 16 the load is blocked. (This test passes in Firefox 45, modulo an event listen
er not firing.)</p> | 16 the load is blocked. (This test passes in Firefox 45, modulo an event listen
er not firing.)</p> |
| 17 | 17 |
| 18 <script> | 18 <script> |
| 19 var src_test = async_test("In-policy async video src"); | 19 var src_test = async_test("In-policy async video src"); |
| 20 var src_redir_test = async_test("in-policy async video src w/redir") | 20 var src_redir_test = async_test("in-policy async video src w/redir") |
| 21 var source_test = async_test("In-policy async video source element"); | 21 var source_test = async_test("In-policy async video source element"); |
| 22 var source_redir_test = async_test("In-policy async video source element w/r
edir"); | 22 var source_redir_test = async_test("In-policy async video source element w/r
edir"); |
| 23 | 23 |
| 24 function media_loaded(t) { | 24 function media_loaded(t) { |
| 25 t.done(); | 25 t.done(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function media_error_handler(t) { | 28 function media_error_handler(t) { |
| 29 t.step( function () { | 29 t.step( function () { |
| 30 assert_unreached("Media error handler shouldn't be triggered for allow
ed domain."); | 30 assert_unreached("Media error handler shouldn't be triggered for allow
ed domain."); |
| 31 }); | 31 }); |
| 32 t.done(); | 32 t.done(); |
| 33 } | 33 } |
| 34 </script> | 34 </script> |
| 35 | 35 |
| 36 <video id="videoObject" width="320" height="240" controls | 36 <video id="videoObject" width="320" height="240" controls |
| 37 onloadeddata="media_loaded(source_test)"> | 37 onloadeddata="media_loaded(source_test)"> |
| 38 <source id="videoSourceObject" | 38 <source id="videoSourceObject" |
| 39 type="video/mp4" | 39 type="video/ogg" |
| 40 onerror="media_error_handler(source_test)" | 40 onerror="media_error_handler(source_test)" |
| 41 src="http://www2.{{host}}:{{ports[http][0]}}/media/white.mp4"> | 41 src="http://{{domains[www2]}}:{{ports[http][0]}}/media/A4.ogv"> |
| 42 </video> | 42 </video> |
| 43 | 43 |
| 44 <video id="videoObject2" width="320" height="240" controls | 44 <video id="videoObject2" width="320" height="240" controls |
| 45 onerror="media_error_handler(src_test)" | 45 onerror="media_error_handler(src_test)" |
| 46 onloadeddata="media_loaded(src_test)" | 46 onloadeddata="media_loaded(src_test)" |
| 47 src="http://www2.{{host}}:{{ports[http][0]}}/media/white.mp4"> | 47 src="http://{{domains[www2]}}:{{ports[http][0]}}/media/A4.ogv"> |
| 48 | 48 |
| 49 <video id="videoObject3" width="320" height="240" controls | 49 <video id="videoObject3" width="320" height="240" controls |
| 50 onloadeddata="media_loaded(source_redir_test)"> | 50 onloadeddata="media_loaded(source_redir_test)"> |
| 51 <source id="videoSourceObject" | 51 <source id="videoSourceObject" |
| 52 type="video/mp4" | 52 type="video/ogg" |
| 53 onerror="media_error_handler(source_test)" | 53 onerror="media_error_handler(source_test)" |
| 54 src="/common/redirect.py?location=http://www2.{{host}}:{{ports[h
ttp][0]}}/media/white.mp4"> | 54 src="/common/redirect.py?location=http://{{domains[www2]}}:{{por
ts[http][0]}}/media/A4.ogv"> |
| 55 </video> | 55 </video> |
| 56 | 56 |
| 57 <video id="videoObject2" width="320" height="240" controls | 57 <video id="videoObject2" width="320" height="240" controls |
| 58 onerror="media_error_handler(src_redir_test)" | 58 onerror="media_error_handler(src_redir_test)" |
| 59 onloadeddata="media_loaded(src_redir_test)" | 59 onloadeddata="media_loaded(src_redir_test)" |
| 60 src="/common/redirect.py?location=http://www2.{{host}}:{{ports[http][
0]}}/media/white.mp4"> | 60 src="/common/redirect.py?location=http://{{domains[www2]}}:{{ports[ht
tp][0]}}/media/A4.ogv"> |
| 61 | 61 |
| 62 <script async defer src="../support/checkReport.sub.js?reportExists=false"> | 62 <script async defer src="../support/checkReport.sub.js?reportExists=false"> |
| 63 </script> | 63 </script> |
| 64 | 64 |
| 65 </body> | 65 </body> |
| 66 </html> | 66 </html> |
| OLD | NEW |