Skip to content

Conversation

@delan
Copy link
Member

@delan delan commented Jul 30, 2025

test_sources_list() relied on https://servo.org/js/load-table.js to test scripts loaded from multiple origins, but that file was deleted a couple of weeks ago. this patch adds a second internal web server, then replaces that load with scripts loaded from two distinct origins: http://127.0.0.1:10000 and http://127.0.0.1:10001.

fixing that test revealed an impl bug where inline module scripts containing import statements may never get their source contents populated. this is because the logic for populating source contents for inline scripts only applied to source actors created before we finished parsing the page. we assumed that inline scripts always block the parser, but this is not the case. this patch ensures that inline source contents can be populated for source actors created after parse.

Testing: adds a new test, test_source_content_with_inline_module_import_external()
Fixes: part of #36325

@delan delan mentioned this pull request Jul 30, 2025
7 tasks
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: Delan Azabani <dazabani@igalia.com>
@delan delan force-pushed the fix-devtools-tests branch from b5371fe to db3ce47 Compare July 30, 2025 11:17
@delan delan enabled auto-merge July 30, 2025 11:17
@delan delan added this pull request to the merge queue Jul 30, 2025
Merged via the queue into main with commit a671c50 Jul 30, 2025
21 checks passed
@delan delan deleted the fix-devtools-tests branch July 30, 2025 11:56
minghuaw pushed a commit to minghuaw/servo that referenced this pull request Aug 1, 2025
test_sources_list() relied on <https://servo.org/js/load-table.js> to
test scripts loaded from multiple origins, but that file was deleted a
couple of weeks ago. this patch adds a second internal web server, then
replaces that load with scripts loaded from two distinct origins:
<http://127.0.0.1:10000> and <http://127.0.0.1:10001>.

fixing that test revealed an impl bug where inline module scripts
containing `import` statements may never get their source contents
populated. this is because the logic for populating source contents for
inline scripts only applied to source actors created *before* we
finished parsing the page. we assumed that inline scripts always block
the parser, but this is not the case. this patch ensures that inline
source contents can be populated for source actors created after parse.

Testing: adds a new test,
test_source_content_with_inline_module_import_external()
Fixes: part of servo#36325

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
delan added a commit that referenced this pull request Aug 7, 2025
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: Delan Azabani <dazabani@igalia.com>
delan added a commit that referenced this pull request Aug 7, 2025
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: Delan Azabani <dazabani@igalia.com>
delan added a commit that referenced this pull request Aug 7, 2025
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: Delan Azabani <dazabani@igalia.com>
github-merge-queue bot pushed a commit that referenced this pull request Aug 7, 2025
in #38359, we intended to land some fixes to the devtools tests, but we
failed to actually include those fixes in the patch. this patch adds a
second internal web server, then reworks test_sources_list() to load
scripts from the two distinct origins of our internal web servers:
<http://127.0.0.1:10000> and <http://127.0.0.1:10001>.

Testing: covered by existing devtools tests, which now actually pass
Fixes: part of #36325

---------

Signed-off-by: Delan Azabani <dazabani@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
PotatoCP added a commit to PotatoCP/servo that referenced this pull request Aug 8, 2025
…38516) (wd)

{"fail_fast": false, "matrix": [{"name": "Linux (WPT)", "workflow": "linux", "wpt": true, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "build_args": "", "wpt_args": "./tests/wpt/tests/webdriver/tests/classic/ --product servodriver --headless --processes 1", "number_of_wpt_chunks": 2}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants