OLD | NEW |
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> |
OLD | NEW |