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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/security/referrer-policy-subresource.html
diff --git a/LayoutTests/http/tests/security/referrer-policy-subresource.html b/LayoutTests/http/tests/security/referrer-policy-subresource.html
index 77f31856ff8c8089496df172e129e390ad13db3b..fcc789aea421d6f25e94fbe976731425cc84a6d7 100644
--- a/LayoutTests/http/tests/security/referrer-policy-subresource.html
+++ b/LayoutTests/http/tests/security/referrer-policy-subresource.html
@@ -3,12 +3,21 @@
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
- <meta name="referrer" content="no-referrer">
</head>
<body>
- <script src="resources/referrer-policy-script.php"></script>
+ <script src="resources/referrer-policy-script.php?1"></script>
+ <meta name="referrer" content="no-referrer">
+ <script>
+ // Test that meta referrer policies are not applied on subresources
+ // loaded before the policy.
+ test(function () {
+ assert_not_equals("none", scriptReferrer);
+ }, "Meta referrer policy is not set on subresource before meta tag");
+ </script>
+ <script src="resources/referrer-policy-script.php?2"></script>
<script>
- // Test that referrer policies are applied on subresources.
+ // Test that meta referrer policies are applied on subresources
+ // loaded after the policy.
// crbug.com/508310
test(function () {
assert_equals("none", scriptReferrer);
« 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