Bug 1468946 [wpt PR 11525] - ES Modules: Set referrer for top-level module script in ModuleScriptLoader, a=testonly
authorHiroki Nakagawa <nhiroki@chromium.org>
Fri, 06 Jul 2018 17:22:15 +0000
changeset 425826 aaf66fd7660f92887f2be75fe8acebe1244bc6ca
parent 425825 b431f227a27055736e45654319a27f30571af954
child 425827 2d3d375085ab145c32c6a3de5589739a3a5ceaf0
push id105141
push userjames@hoppipolla.co.uk
push dateWed, 11 Jul 2018 07:44:38 +0000
treeherdermozilla-inbound@b06fa226ba6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1468946, 11525, 842553, 1102236, 567937
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1468946 [wpt PR 11525] - ES Modules: Set referrer for top-level module script in ModuleScriptLoader, a=testonly Automatic update from web-platform-testsES Modules: Set referrer for top-level module script in ModuleScriptLoader Before this CL, referrer for top-level module script is set in BaseFetchContext::AddAdditionalRequestHeaders() using ExecutionContext::GetOutgoingReferrer(). This works for documents, but doesn't for workers because this execution context is corresponding to "module map settings object", not "fetch client settings object". To fix this, this CL sets the referrer for top-level module script using "fetch client settings object" in ModuleScriptLoader as the spec defines. Change-Id: I0878b13febdae4ee2dc56c998e7f2c100e9c1ba7 Bug: 842553 Reviewed-on: https://chromium-review.googlesource.com/1102236 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#567937} -- wpt-commits: 561fbb9d097472b33de81436f19ea28d00b1dc14 wpt-pr: 11525
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/workers/modules/dedicated-worker-import-referrer.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -628393,17 +628393,17 @@
    "63b2320a3ecf6133a3525574bf5a1d185d1f3aa7",
    "testharness"
   ],
   "workers/modules/dedicated-worker-import-meta.html": [
    "32cd3419ff904a2440d9a6eaa7cb28f78d4a7e32",
    "testharness"
   ],
   "workers/modules/dedicated-worker-import-referrer.html": [
-   "c6a618329eac51a8d6bbf0f7aece906145f49a33",
+   "309df42ef9329addc1fc59e2d3c0443454e14ad7",
    "testharness"
   ],
   "workers/modules/dedicated-worker-import.html": [
    "0b839e87ae98ad1abf32216a2086334cbc011ac0",
    "testharness"
   ],
   "workers/modules/dedicated-worker-options-credentials.html": [
    "f182ac364e933ce744b18c0ca6e03ae975a883a3",
--- a/testing/web-platform/tests/workers/modules/dedicated-worker-import-referrer.html
+++ b/testing/web-platform/tests/workers/modules/dedicated-worker-import-referrer.html
@@ -99,17 +99,17 @@ import_referrer_test(
       windowReferrerPolicy: 'origin',
       expectedReferrer: window.location.origin + '/' },
     'Same-origin top-level module script loading with "origin" referrer ' +
         'policy');
 
 import_referrer_test(
     { scriptURL: 'referrer-checker.py',
       windowReferrerPolicy: 'same-origin',
-      expectedReferrer: createURLString('resources/referrer-window.html') },
+      expectedReferrer: createURLString('resources/new-worker-window.html') },
     'Same-origin top-level module script loading with "same-origin" referrer ' +
         'policy');
 
 // Tests for static imports.
 //
 // Static imports should obey the window's ReferrerPolicy, and send the worker's
 // URL as a referrer.
 //