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

Side by Side Diff: LayoutTests/http/tests/security/referrer-policy-subresource.html

Issue 1236283006: Add test for subresource loading before meta referrer policy (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | LayoutTests/http/tests/security/resources/referrer-policy-script.php » ('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 <meta name="referrer" content="no-referrer">
7 </head> 6 </head>
8 <body> 7 <body>
9 <script src="resources/referrer-policy-script.php"></script> 8 <script src="resources/referrer-policy-script.php?1"></script>
9 <meta name="referrer" content="no-referrer">
10 <script> 10 <script>
11 // Test that referrer policies are applied on subresources. 11 // Test that meta referrer policies are not applied on subresources
12 // loaded before the policy.
13 test(function () {
14 assert_not_equals("none", scriptReferrer);
15 }, "Meta referrer policy is not set on subresource before meta tag");
16 </script>
17 <script src="resources/referrer-policy-script.php?2"></script>
18 <script>
19 // Test that meta referrer policies are applied on subresources
20 // loaded after the policy.
12 // crbug.com/508310 21 // crbug.com/508310
13 test(function () { 22 test(function () {
14 assert_equals("none", scriptReferrer); 23 assert_equals("none", scriptReferrer);
15 }, "Meta referrer policy is set on subresource"); 24 }, "Meta referrer policy is set on subresource");
16 </script> 25 </script>
17 </body> 26 </body>
18 </html> 27 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/resources/referrer-policy-script.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698