Skip to content

Let the reftest analyzer load images from absolute URLs - #21928

Merged
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:analyzer-cross-origin
Sep 10, 2026
Merged

calixteman merged 1 commit into
mozilla:masterfrom
calixteman:analyzer-cross-origin

Conversation

@calixteman

Copy link
Copy Markdown
Contributor

The path of the log is only prepended to relative image paths, and images coming from another origin are fetched with CORS so that their pixels can be compared. This lets the reference tests report of mozilla/pdf.js.pdfs point to the references stored in mozilla/pdf.js.refs instead of copying them.

@calixteman calixteman added test To Review For PRs to review after they've been merged (for example when reviewers are off). infra Infrastructure related labels Sep 10, 2026
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
Comment thread test/resources/reftest-analyzer.js Fixed
@codecov-commenter

codecov-commenter commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 90.30%. Comparing base (10db1d6) to head (da81ae9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21928   +/-   ##
=======================================
  Coverage   90.30%   90.30%           
=======================================
  Files         269      269           
  Lines       67534    67534           
=======================================
  Hits        60989    60989           
  Misses       6545     6545           
Flag Coverage Ξ”
unittestcli 57.98% <ΓΈ> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@calixteman
calixteman force-pushed the analyzer-cross-origin branch 2 times, most recently from 360801a to 2fe2e2c Compare September 10, 2026 14:57
Comment thread test/resources/reftest-analyzer.js Fixed
The path of the log is only prepended to relative image paths. An absolute
URL is accepted when it points to a reference in mozilla/pdf.js.refs
(revision, platform, browser, test id and page are checked, and the URL is
rebuilt from a constant prefix); it is then fetched with CORS so that the
pixels can be compared. This lets the reference tests report of
mozilla/pdf.js.pdfs link the references instead of copying them.
@calixteman
calixteman force-pushed the analyzer-cross-origin branch from 2fe2e2c to da81ae9 Compare September 10, 2026 15:26
@calixteman

Copy link
Copy Markdown
Contributor Author

I'm merging but if you see anything wrong please tell me.

@calixteman
calixteman merged commit 61385f9 into mozilla:master Sep 10, 2026
8 of 9 checks passed
@calixteman
calixteman deleted the analyzer-cross-origin branch September 10, 2026 15:37
@timvandermeij
timvandermeij removed their request for review September 11, 2026 18:15
@timvandermeij timvandermeij removed the To Review For PRs to review after they've been merged (for example when reviewers are off). label Sep 11, 2026
@timvandermeij

Copy link
Copy Markdown
Collaborator

Looks good to me; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Infrastructure related test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants