OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Referrer Policy: CSP 'referrer' directive should not be supported</ti
tle> |
| 5 <meta http-equiv="Content-Security-Policy" content="referrer no-referrer"> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 <!-- Common global functions for referrer-policy tests. --> |
| 9 <script src="/referrer-policy/generic/common.js"></script> |
| 10 </head> |
| 11 <body> |
| 12 <h1>Referrer Policy: CSP 'referrer' directive should not be supported</h1> |
| 13 <p>CSP used to have a 'referrer' directive to set a Referrer Policy. This di
rective has been removed and should not be supported.</p> |
| 14 |
| 15 <pre id="received_message">Running...</pre> |
| 16 |
| 17 <script> |
| 18 var test = async_test("Image has a referrer despite CSP 'referrer' directi
ve"); |
| 19 var urlPath = '/referrer-policy/generic/subresource/image.py?cache_destroy
er=' + (new Date()).getTime(); |
| 20 var url = location.protocol + "//www1." + location.hostname + ":" + locati
on.port + |
| 21 urlPath; |
| 22 queryImage(url, test.step_func(function(message) { |
| 23 assert_equals(message.referrer, document.location.href); |
| 24 test.done(); |
| 25 })); |
| 26 </script> |
| 27 |
| 28 <div id="log"></div> |
| 29 </body> |
| 30 </html> |
OLD | NEW |