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

Unified Diff: LayoutTests/http/tests/security/referrer-policy-worker-no-referrer.html

Issue 1117203002: Enforce referrer policies for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix layout test indentation Created 5 years, 8 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-worker-no-referrer.html
diff --git a/LayoutTests/http/tests/security/referrer-policy-worker-no-referrer.html b/LayoutTests/http/tests/security/referrer-policy-worker-no-referrer.html
new file mode 100644
index 0000000000000000000000000000000000000000..37948fc6a48a576dab8b6334d7e21226c4be1121
--- /dev/null
+++ b/LayoutTests/http/tests/security/referrer-policy-worker-no-referrer.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<script>
+ async_test(function () {
+ var worker = new Worker('http://127.0.0.1:8000/security/contentSecurityPolicy/resources/worker.php?type=report-referrer&csp=' +
+ encodeURIComponent('referrer no-referrer'));
+ worker.onmessage = this.step_func(function (event) {
+ assert_equals("HTTP Referer header is empty", event.data);
+ this.done();
+ });
+ }, "Worker with no-referrer CSP");
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698