Skip to content

Tests: Re-enable CSM e2e suite on Chromium 148+ and align expectations#28

Closed
adamsilverstein wants to merge 1 commit into
fix/preview-interstitial-dip-isolationfrom
fix/csm-e2e-chrome148
Closed

Tests: Re-enable CSM e2e suite on Chromium 148+ and align expectations#28
adamsilverstein wants to merge 1 commit into
fix/preview-interstitial-dip-isolationfrom
fix/csm-e2e-chrome148

Conversation

@adamsilverstein

Copy link
Copy Markdown
Owner

What

Stacked on #79342 (the preview-interstitial DIP fix). Re-enables the client-side media processing (CSM) e2e suite on Chromium 148+ and fixes the non-EXIF test failures that surfaced once CSM became active in CI.

WordPress#79342 currently keeps these tests skipped on Chromium 148+ so its CI is green while scoped to the preview fix. This PR is the follow-up that actually un-skips the suite and corrects the assertions.

Why

There is no Chromium 148 or wasm-vips regression. An isolation harness on real Chrome 149 runs every wasm-vips op (rotate → 768×1024, thumbnail, JPEG→WebP, PNG→JPEG) successfully across main-thread, nested Web Worker, COOP/COEP, Document-Isolation-Policy isolate-and-credentialless, and ArrayBuffer-transfer-into-worker contexts.

The CSM suite simply never ran in CI before: Chrome < 148 does not enable cross-origin isolation, so CSM stayed inactive and these tests skipped. The Playwright/Chrome 148 upgrade (#78632) switched CSM on in CI for the first time, exposing assertions that never matched real CSM behavior.

Fixes

  • UltraHDR probe import — resolve wasm-vips via @wordpress/vips so the dynamic import works in a clean CI install where the dependency is not hoisted to the repo root.
  • PNG→JPEG / JPEG→WebPimage_editor_output_format governs only the generated sub-sizes; the full-size attachment keeps its original MIME type (matching core, which does not change post_mime_type for sub-threshold images). Assert the sub-size MIME/URL instead of the main file.
  • srcset — capture the attachment ID while the editor data store is still loaded (before navigating to the front end, where window.wp.data does not exist) and assert the block settles on a finalized uploaded URL rather than a transient blob: URL.

Out of scope

EXIF orientation handling is intentionally left as test.fixme here. The client-side EXIF sub-size rotation fix (for AVIF/HEIF whose orientation lives in an EXIF tag rather than a native irot transform) and its e2e coverage land separately in #79384 / #79383.

The preload and performance specs remain skipped on Chromium 148+; their editor-startup networkidle timeout under cross-origin isolation is a separate, not-yet-root-caused issue.

Validation

Validated on the combined branch (#79381): the CSM suite passes on Chromium 148 with these expectations. The only e2e failures in that run were pre-existing flakes unrelated to CSM (image.spec.js › should upload external image to media library, a network-dependent external download that bypasses CSM; and an editor-collaboration comment-size test).

Re-enable the client-side media processing e2e suite on Chromium 148+ (drop
the skip gate added for the Playwright/Chrome upgrade) and correct the test
expectations that were exposed when CSM first became active in CI.

There is no Chromium 148 or wasm-vips regression: an isolation harness on
real Chrome 149 runs every wasm-vips op (rotate, thumbnail, format convert)
successfully across main-thread, Web Worker, COOP/COEP, Document-Isolation-
Policy `isolate-and-credentialless`, and ArrayBuffer-transfer contexts. The
suite simply never ran in CI before (Chrome < 148 has no cross-origin
isolation, so CSM stayed inactive and the tests skipped), so several
assertions that never matched real CSM behavior were never caught.

Corrections:
- Resolve `wasm-vips` via `@wordpress/vips` so the UltraHDR probe import works
  in a clean CI install where the dependency is not hoisted to the root.
- PNG-to-JPEG / JPEG-to-WebP: `image_editor_output_format` governs only the
  generated sub-sizes; the full-size attachment keeps its original MIME type,
  matching core. Assert the sub-size MIME/URL instead of the main file.
- srcset: capture the attachment ID while the editor data store is still
  loaded (before navigating to the front end) and assert the block settles on
  a finalized uploaded URL rather than a transient blob URL.

EXIF orientation handling is intentionally left as `test.fixme` here; the
client-side EXIF sub-size rotation fix and its coverage land separately in
PR WordPress#79384.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ce10660d-cf5a-4f02-8d18-dfdd8ea07b2e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/csm-e2e-chrome148

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 8.6 MB

compressed-size-action

@adamsilverstein

Copy link
Copy Markdown
Owner Author

closing in favor of WordPress#79385

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.

1 participant