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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/shared-worker-with-header.html

Issue 2086143006: Implement Referrer-Policy header for workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: isolatedCopy Created 4 years, 6 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: third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/shared-worker-with-header.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/shared-worker-with-header.html b/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/shared-worker-with-header.html
new file mode 100644
index 0000000000000000000000000000000000000000..74eb43f76542ca86489c14a91f5e04cca898ffbd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/shared-worker-with-header.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>Worker served with Referrer-Policy header</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/get-host-info.js?pipe=sub"></script>
+<script>
+async_test(function(t) {
+ var worker = new SharedWorker('http://127.0.0.1:8000/security/referrerPolicyHeader/resources/worker.php');
Mike West 2016/06/24 10:38:47 Nit: If you're going to use `get_host_info` below,
estark 2016/06/24 17:34:41 Huh, not sure why I made that absolute. Fixed. Tha
+ worker.port.onmessage = t.step_func(function (e) {
+ assert_equals(e.data, get_host_info()['HTTP_ORIGIN'] + '/');
+ t.done();
+ });
+ worker.port.start();
+ }, 'Worker script served with a Referrer-Policy header');
+</script>

Powered by Google App Engine
This is Rietveld 408576698