Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-child-frame-navigates-to-blocked-origin.html

Issue 2190183002: Forward CSP violation reporting from RenderFrameProxy to RenderFrameImpl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sanitize report endpoints from IPC against actual CSP contents. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698