Skip to content

[web] Test that Firefox < 147 rejects dart2wasm before Wasm capability checks - #193667

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
kevmoo:firefox-wasm-fallback-test
Oct 2, 2026
Merged

auto-submit[bot] merged 4 commits into
flutter:masterfrom
kevmoo:firefox-wasm-fallback-test

Conversation

@kevmoo

@kevmoo kevmoo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Adds a regression test in fallbacks_test.dart (firefox-fallbacks suite) verifying the Firefox < 147 version gate added in #193180 (and its precedence over _flutter.supportsDart2Wasm in #193271):

  1. Firefox 146 (< 147): Even when wasmAllowList: { gecko: true } is configured, _flutter.supportsDart2Wasm is true, and WebAssembly.validate returns true, FlutterLoader.load rejects dart2wasm builds before invoking WebAssembly.validate (validateCalls == 0).
  2. Firefox 147 (>= 147): Passes the Firefox version gate and proceeds to evaluate WebAssembly.validate (validateCalls > 0).

Related to #143603 and #186619

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

…y checks

Verifies in `firefox-fallbacks` (`fallbacks_test.dart`) that:
1. Firefox 146 (`< 147`) rejects `dart2wasm` builds before evaluating `WebAssembly.validate` or `_flutter.supportsDart2Wasm` even when `wasmAllowList: { gecko: true }` is configured.
2. Firefox 147 (`>= 147`) passes the Firefox version gate and proceeds to evaluate `WebAssembly.validate`.

Related to flutter#143603 and flutter#186619
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a test to verify that the loader rejects dart2wasm on Firefox versions older than 147 before evaluating Wasm capabilities. Feedback on the test implementation suggests deleting the supportsDart2Wasm property in the finally block to properly restore the global state, and removing a redundant redefinition of supportsDart2Wasm in the second step of the test.

Comment thread engine/src/flutter/lib/web_ui/test/fallbacks/fallbacks_test.dart Outdated
Comment thread engine/src/flutter/lib/web_ui/test/fallbacks/fallbacks_test.dart Outdated
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team labels Oct 1, 2026
@kevmoo
kevmoo requested a review from mdebbar October 1, 2026 18:52
mdebbar
mdebbar previously approved these changes Oct 1, 2026
Comment thread engine/src/flutter/lib/web_ui/test/fallbacks/fallbacks_test.dart Outdated
Comment thread engine/src/flutter/lib/web_ui/test/fallbacks/fallbacks_test.dart Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants