Add test for referrer in module imports#40474
Add test for referrer in module imports#40474domenic merged 3 commits intoweb-platform-tests:masterfrom
Conversation
|
@annevk Do you know what might be causing this?
I see it happening both locally and on CI (https://github.com/web-platform-tests/wpt/pull/40474/checks?check_run_id=14137937410 should show 3/4) |
|
Oh sorry I missed that. Maybe @domenic can help with that. I'm surprised we have dedicatedworker-module but not window-module. Perhaps using dedicatedworker-module as per https://web-platform-tests.org/writing-tests/testharness.html#tests-for-other-or-multiple-globals-any-js would be a way around this problem though? (Although I don't really know what the support level for that is at the moment.) |
|
Test fixed, the problem was top-level await. Thanks @lucacasonato for helping with this! |
This PR adds tests for the
referrerused by fetches of modules imported usingimportstatements and dynamicimport().The first commit adds tests for the currently specified behavior, while the second commit updates it to match the behavior proposed in whatwg/html#3744 to align static and dynamic imports.
From my manual tests, Firefox implements the new behavior while Webkit and Chromium implement the current behavior.
There is something wrong with the tests, because Chrome and Safari only run the first one, but I cannot figure out why. If I delete the first test, then they only run the second one (that becomes first).