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

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

Issue 2255103002: CSP: Strip reported URLs for 'frame-src' and 'object-src'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: estark 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <meta http-equiv="Content-Security-Policy" content="frame-src 'none'"> 1 <!doctype html>
2 <script src="resources/dump-as-text.js"></script> 2 <script src="/resources/testharness.js"></script>
3 <iframe src="resources/alert-fail.html"></iframe> 3 <script src="/resources/testharnessreport.js"></script>
4 <meta http-equiv="Content-Security-Policy" content="frame-src 'self'">
5 <script>
6 async_test(t => {
7 var watcher = new EventWatcher(t, document, ['securitypolicyviolation']) ;
8 watcher
9 .wait_for('securitypolicyviolation')
10 .then(t.step_func(e => {
11 assert_equals(e.blockedURI, "http://localhost:8000", "The report ed URL should be stripped.");
12 assert_equals(e.lineNumber, 21, "IFrame injected from script on this page.");
13 t.done();
14 }));
15
16 window.onmessage = t.unreached_func('No message should be sent from the frame.');
17 window.onload = _ => {
18 var url = "http://localhost:8000/security/resources/post-done.html";
19 var i = document.createElement('iframe');
20 i.src = url;
21 document.body.appendChild(i);
22 };
23 }, "The unredirected frame is blocked.");
24 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698