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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/subsumption_algorithm-general.html

Issue 2556713002: Embedding-CSP: Ports subsumption (Closed)
Patch Set: Adding a comment Created 4 years 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/Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698