OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Security-Policy" content="frame-src https://localh
ost:8443"> | 4 <meta http-equiv="Content-Security-Policy" content="frame-src https://localh
ost:8443"> |
5 <script> | 5 <script> |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 testRunner.dumpChildFramesAsText(); | 7 testRunner.dumpChildFramesAsText(); |
| 8 testRunner.waitUntilDone(); |
| 9 |
| 10 document.addEventListener("securitypolicyviolation", function(e) { |
| 11 console.log("securitypolicyviolation_event.documentURI=" + e.documen
tURI); |
| 12 console.log("securitypolicyviolation_event.blockedURI=" + e.blockedU
RI); |
| 13 console.log("securitypolicyviolation_event.violatedDirective=" + e.v
iolatedDirective); |
| 14 testRunner.notifyDone(); |
| 15 }); |
8 </script> | 16 </script> |
9 </head> | 17 </head> |
10 <body> | 18 <body> |
11 The test verifies that Content-Security-Policy from the main frame | 19 The test verifies that Content-Security-Policy from the main frame |
12 restricts child frame's location even when the location is changed | 20 restricts child frame's location even when the location is changed |
13 as a result of a navigation trigerred from within the child frame | 21 as a result of a navigation trigerred from within the child frame |
14 (which might reside in another renderer process due to --site-per-process). | 22 (which might reside in another renderer process due to --site-per-process). |
15 <iframe src="https://localhost:8443/security/contentSecurityPolicy/resources
/frame-that-navigates-itself.html"></iframe> | 23 <iframe src="https://localhost:8443/security/contentSecurityPolicy/resources
/frame-that-navigates-itself.html"></iframe> |
16 </body> | 24 </body> |
17 </html> | 25 </html> |
OLD | NEW |