OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
5 <script src="/resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
6 <script src="/security/contentSecurityPolicy/resources/child-csp-test.js"></
script> | 6 <script src="/security/contentSecurityPolicy/resources/child-csp-test.js"></
script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <script> | 9 <script> |
10 async_test(t => { | 10 async_test(t => { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 url = generateUrlWithCSP(CROSS_ORIGIN, returned_csp); | 45 url = generateUrlWithCSP(CROSS_ORIGIN, returned_csp); |
46 injectIframeWithCSP(url, EXPECT_BLOCK, required_csp, t, "5"); | 46 injectIframeWithCSP(url, EXPECT_BLOCK, required_csp, t, "5"); |
47 }, "Iframe with a different CSP should be blocked."); | 47 }, "Iframe with a different CSP should be blocked."); |
48 | 48 |
49 async_test(t => { | 49 async_test(t => { |
50 required_csp = "frame-src http://c.com:443 http://b.com"; | 50 required_csp = "frame-src http://c.com:443 http://b.com"; |
51 returned_csp = "frame-src http://b.com:80 http://c.com:443"; | 51 returned_csp = "frame-src http://b.com:80 http://c.com:443"; |
52 url = generateUrlWithCSP(CROSS_ORIGIN, returned_csp); | 52 url = generateUrlWithCSP(CROSS_ORIGIN, returned_csp); |
53 injectIframeWithCSP(url, EXPECT_LOAD, required_csp, t, "6"); | 53 injectIframeWithCSP(url, EXPECT_LOAD, required_csp, t, "6"); |
54 }, "Iframe with a matching and more restrictive ports should load."); | 54 }, "Iframe with a matching and more restrictive ports should load."); |
| 55 |
| 56 async_test(t => { |
| 57 required_csp = "frame-src http://b.com:80"; |
| 58 returned_csp = "child-src https://b.com:443"; |
| 59 url = generateUrlWithCSP(CROSS_ORIGIN, returned_csp); |
| 60 injectIframeWithCSP(url, EXPECT_LOAD, required_csp, t, "7"); |
| 61 }, "Iframe must load even if the ports are different but are default for
the protocols."); |
55 </script> | 62 </script> |
56 </body> | 63 </body> |
57 </html> | 64 </html> |
OLD | NEW |