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

Unified Diff: LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html

Issue 1291613010: Implement referrerpolicy attribute for img elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: actually fix webexposed test this time Created 5 years, 4 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
Index: LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
diff --git a/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html b/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
new file mode 100644
index 0000000000000000000000000000000000000000..a461f7242eb8159b944b37116e4e22013eefe9e4
--- /dev/null
+++ b/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/get-host-info.js"></script>
+</head>
+<body>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ if (window.location.origin != get_host_info().HTTPS_ORIGIN) {
+ window.location = get_host_info().HTTPS_ORIGIN + window.location.pathname;
+ } else {
+ var img = document.createElement("img");
+ img.src = "http://127.0.0.1:8000/security/resources/green-if-no-referrer.php";
+ img.referrerpolicy = "no-referrer-when-downgrade";
+ document.body.appendChild(img);
+ testRunner.notifyDone();
+ }
+ </script>
+</body>
+</html

Powered by Google App Engine
This is Rietveld 408576698