| Index: third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/resources/worker.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/resources/worker.php b/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/resources/worker.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..af9a9b2b7ca5e34c973032fabaf2e2a01c755e1a
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/referrerPolicyHeader/resources/worker.php
|
| @@ -0,0 +1,14 @@
|
| +<?
|
| +header('Content-Type: application/javascript');
|
| +header('Referrer-Policy: origin');
|
| +?>
|
| +importScripts('save-referrer.php');
|
| +
|
| +// When loaded as a shared worker, send the referrer on connect.
|
| +onconnect = function (e) {
|
| + var port = e.ports[0];
|
| + port.postMessage(referrer);
|
| +}
|
| +
|
| +// When loaded as a dedicated worker, send the referrer to the document immediately.
|
| +postMessage(referrer);
|
|
|