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

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

Issue 1328183002: Implement referrerpolicy attr for iframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update webexposed tests Created 5 years, 3 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-iframe-no-referrer-when-downgrade.html
diff --git a/LayoutTests/http/tests/security/referrer-policy-attribute-iframe-no-referrer-when-downgrade.html b/LayoutTests/http/tests/security/referrer-policy-attribute-iframe-no-referrer-when-downgrade.html
new file mode 100644
index 0000000000000000000000000000000000000000..89591aff48978f3873c647af77d55b1ca84231aa
--- /dev/null
+++ b/LayoutTests/http/tests/security/referrer-policy-attribute-iframe-no-referrer-when-downgrade.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/get-host-info.js"></script>
+ </head>
+ <body>
+ <script>
+ if (window.location.origin != get_host_info().HTTPS_ORIGIN) {
+ window.location = get_host_info().HTTPS_ORIGIN + window.location.pathname;
+ } else {
+ testRunner.overridePreference("WebKitAllowRunningInsecureContent", true);
+ async_test(function () {
+ window.onmessage = this.step_func(function (event) {
+ if (event.data.policy === "no-referrer-when-downgrade") {
+ assert_equals(event.data.referrer, "");
+ this.done();
+ }
+ });
+ }, "no-referrer-when-downgrade attribute on iframe");
+ }
+ </script>
+
+ <iframe src="http://127.0.0.1:8000/security/resources/referrer-attr-iframe-target.html#no-referrer-when-downgrade" referrerpolicy="no-referrer-when-downgrade" />
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698