| Index: third_party/WebKit/LayoutTests/http/tests/fetch/referrer/resources/origin-when-cross-origin-serviceworker-from-document.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/referrer/resources/origin-when-cross-origin-serviceworker-from-document.html b/third_party/WebKit/LayoutTests/http/tests/fetch/referrer/resources/origin-when-cross-origin-serviceworker-from-document.html
|
| index 63f7913ed4da5605b39f764d4e75603af2946b2a..118db7482a9a50f68d6a6487564475da75eb2848 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/fetch/referrer/resources/origin-when-cross-origin-serviceworker-from-document.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/fetch/referrer/resources/origin-when-cross-origin-serviceworker-from-document.html
|
| @@ -8,13 +8,13 @@
|
| <script src = "/fetch/resources/fetch-test-helpers.js"></script>
|
| <script src = "/fetch/resources/fetch-test-options.js"></script>
|
| <script>
|
| -var SCRIPT =
|
| +const SCRIPT =
|
| '/fetch/referrer/resources/origin-when-cross-origin-simple-onfetch-js.php';
|
| -var SCOPE = location.href;
|
| +const SCOPE = location.href;
|
|
|
| -var BASE_URL = BASE_ORIGIN + '/fetch/resources/referrer.php';
|
| -var OTHER_URL = OTHER_ORIGIN + '/fetch/resources/referrer.php';
|
| -var REFERRER_SOURCE = location.href;
|
| +const BASE_URL = BASE_ORIGIN + '/fetch/resources/referrer.php';
|
| +const OTHER_URL = OTHER_ORIGIN + '/fetch/resources/referrer.php';
|
| +const REFERRER_SOURCE = location.href;
|
|
|
| promise_test(t => {
|
| return navigator.serviceWorker.register(SCRIPT, {scope: SCOPE}).then(r => {
|
| @@ -26,13 +26,45 @@ promise_test(t => {
|
| });
|
| });
|
|
|
| -var TESTS = [
|
| - [BASE_URL, 'about:client', REFERRER_SOURCE],
|
| - [BASE_URL, '', '[no-referrer]'],
|
| - [BASE_URL, '/foo', BASE_ORIGIN + '/foo'],
|
| - [OTHER_URL, 'about:client', BASE_ORIGIN + '/'],
|
| - [OTHER_URL, '', '[no-referrer]'],
|
| - [OTHER_URL, '/foo', BASE_ORIGIN + '/'],
|
| +const TESTS = [
|
| + [BASE_URL, 'about:client', '', REFERRER_SOURCE],
|
| + [BASE_URL, 'about:client', 'no-referrer', '[no-referrer]'],
|
| + [BASE_URL, 'about:client', 'no-referrer-when-downgrade', REFERRER_SOURCE],
|
| + [BASE_URL, 'about:client', 'origin', BASE_ORIGIN + '/'],
|
| + [BASE_URL, 'about:client', 'origin-when-cross-origin', REFERRER_SOURCE],
|
| + [BASE_URL, 'about:client', 'unsafe-url', REFERRER_SOURCE],
|
| + [OTHER_URL, 'about:client', '', REFERRER_SOURCE],
|
| + [OTHER_URL, 'about:client', 'no-referrer', '[no-referrer]'],
|
| + [OTHER_URL, 'about:client', 'no-referrer-when-downgrade', REFERRER_SOURCE],
|
| + [OTHER_URL, 'about:client', 'origin', BASE_ORIGIN + '/'],
|
| + [OTHER_URL, 'about:client', 'origin-when-cross-origin', BASE_ORIGIN + '/'],
|
| + [OTHER_URL, 'about:client', 'unsafe-url', REFERRER_SOURCE],
|
| +
|
| + [BASE_URL, '', '', '[no-referrer]'],
|
| + [BASE_URL, '', 'no-referrer', '[no-referrer]'],
|
| + [BASE_URL, '', 'no-referrer-when-downgrade', '[no-referrer]'],
|
| + [BASE_URL, '', 'origin', '[no-referrer]'],
|
| + [BASE_URL, '', 'origin-when-cross-origin', '[no-referrer]'],
|
| + [BASE_URL, '', 'unsafe-url', '[no-referrer]'],
|
| + [OTHER_URL, '', '', '[no-referrer]'],
|
| + [OTHER_URL, '', 'no-referrer', '[no-referrer]'],
|
| + [OTHER_URL, '', 'no-referrer-when-downgrade', '[no-referrer]'],
|
| + [OTHER_URL, '', 'origin', '[no-referrer]'],
|
| + [OTHER_URL, '', 'origin-when-cross-origin', '[no-referrer]'],
|
| + [OTHER_URL, '', 'unsafe-url', '[no-referrer]'],
|
| +
|
| + [BASE_URL, '/foo', '', BASE_ORIGIN + '/foo'],
|
| + [BASE_URL, '/foo', 'no-referrer', '[no-referrer]'],
|
| + [BASE_URL, '/foo', 'no-referrer-when-downgrade', BASE_ORIGIN + '/foo'],
|
| + [BASE_URL, '/foo', 'origin', BASE_ORIGIN + '/'],
|
| + [BASE_URL, '/foo', 'origin-when-cross-origin', BASE_ORIGIN + '/foo'],
|
| + [BASE_URL, '/foo', 'unsafe-url', BASE_ORIGIN + '/foo'],
|
| + [OTHER_URL, '/foo', '', BASE_ORIGIN + '/foo'],
|
| + [OTHER_URL, '/foo', 'no-referrer', '[no-referrer]'],
|
| + [OTHER_URL, '/foo', 'no-referrer-when-downgrade', BASE_ORIGIN + '/foo'],
|
| + [OTHER_URL, '/foo', 'origin', BASE_ORIGIN + '/'],
|
| + [OTHER_URL, '/foo', 'origin-when-cross-origin', BASE_ORIGIN + '/'],
|
| + [OTHER_URL, '/foo', 'unsafe-url', BASE_ORIGIN + '/foo'],
|
| ];
|
|
|
| add_referrer_tests(TESTS);
|
|
|