Bug 1467512 [wpt PR 11379] - Worker: Use Document's SettingsObject for top-level module script loading on dedicated workers, a=testonly
authorHiroki Nakagawa <nhiroki@chromium.org>
Tue, 26 Jun 2018 02:53:01 +0000
changeset 812109 680d6f0eb09d5a382a3d3e488553ef637de92254
parent 812108 2421d396b95d1034a4ed11368615ee2ed91e6234
child 812110 f27248fd9a0c66d1e8b87085365f4de286491691
push id114453
push userrwood@mozilla.com
push dateThu, 28 Jun 2018 15:10:03 +0000
reviewerstestonly
bugs1467512, 11379, 842553, 845285, 1084133, 565199
milestone63.0a1
Bug 1467512 [wpt PR 11379] - Worker: Use Document's SettingsObject for top-level module script loading on dedicated workers, a=testonly Automatic update from web-platform-testsWorker: Use Document's SettingsObject for top-level module script loading on dedicated workers This CL makes Document serve its settings object ("outside settings") to WorkerGlobalScope based on the following HTML spec: Step 13. "Fetch a module worker script graph given url, outside settings, destination, the value of the credentials member of options, and inside settings." https://html.spec.whatwg.org/multipage/workers.html#worker-processing-model This SettingsObject is used as "fetch client settings object" for top-level module script loading and static imports. Before this CL, WorkerGlobalScope's settings object ("inside_settings_object") is used as "fetch client settings object". This is obviously wrong and fails some web-platform-tests. This change fixes them. Change-Id: I87a78f38308e262425b848d99dc617dbddeb81e7 Bug: 842553, 845285 Reviewed-on: https://chromium-review.googlesource.com/1084133 Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#565199} -- wpt-commits: ed2f4a4d980a609e817b4115d025cd06202a9882 wpt-pr: 11379
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
@@ -625979,17 +625979,17 @@
    "63b2320a3ecf6133a3525574bf5a1d185d1f3aa7",
    "testharness"
   ],
   "workers/modules/dedicated-worker-import-meta.html": [
    "32cd3419ff904a2440d9a6eaa7cb28f78d4a7e32",
    "testharness"
   ],
   "workers/modules/dedicated-worker-import-referrer.html": [
-   "44dbc8c1b5c14293622e7c916cb82b810509eb52",
+   "c6a618329eac51a8d6bbf0f7aece906145f49a33",
    "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
@@ -129,17 +129,18 @@ import_referrer_test(
     { scriptURL: 'static-import-same-origin-referrer-checker-worker.js',
       windowReferrerPolicy: 'origin',
       expectedReferrer: window.location.origin + '/' },
     'Same-origin static import with "origin" referrer policy.');
 
 import_referrer_test(
     { scriptURL: 'static-import-same-origin-referrer-checker-worker.js',
       windowReferrerPolicy: 'same-origin',
-      expectedReferrer: createURLString('resources/referrer-window.html') },
+      expectedReferrer: createURLString(
+          'resources/static-import-same-origin-referrer-checker-worker.js') },
     'Same-origin static import with "same-origin" referrer policy.');
 
 import_referrer_test(
     { scriptURL: 'static-import-remote-origin-referrer-checker-worker.sub.js',
       windowReferrerPolicy: 'no-referrer',
       expectedReferrer: '' },
     'Cross-origin static import with "no-referrer" referrer policy.');