Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / security / referrer-policy-subresource.html
blobfcc789aea421d6f25e94fbe976731425cc84a6d7
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script>
6 </head>
7 <body>
8 <script src="resources/referrer-policy-script.php?1"></script>
9 <meta name="referrer" content="no-referrer">
10 <script>
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.
21 // crbug.com/508310
22 test(function () {
23 assert_equals("none", scriptReferrer);
24 }, "Meta referrer policy is set on subresource");
25 </script>
26 </body>
27 </html>