Skip to content

[CP-stable][web] Fix failure on Firefox 148#182982

Merged
auto-submit[bot] merged 1 commit into
flutter:flutter-3.41-candidate.0from
flutteractionsbot:cp-stable-b31548feb941947afb7c0c4b2be9f6584fe1a41c
Feb 27, 2026
Merged

[CP-stable][web] Fix failure on Firefox 148#182982
auto-submit[bot] merged 1 commit into
flutter:flutter-3.41-candidate.0from
flutteractionsbot:cp-stable-b31548feb941947afb7c0c4b2be9f6584fe1a41c

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Feb 27, 2026

Copy link
Copy Markdown
Contributor

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

There's no issue, but we got few CI failures.

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Fails in CI and could block releases.

Changelog Description:

Explain this cherry pick:

  • In one line that is accessible to most Flutter developers.
  • That describes the state prior to the fix.
  • That includes which platforms are impacted.
    See best practices for examples.

Fix test failure that happens in Firefox 148 because they added support for TrustedTypes.

Workaround:

Is there a workaround for this issue?

No workaround.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

Notice no more failures in CI.

Prior to 148, Firefox didn't have support for `TrustedTypes`, so it made
sense to always run the non-TrustedTypes test on Firefox.

With 148, Firefox [added
support](https://www.firefox.com/en-US/firefox/148.0/releasenotes/) for
TrustedTypes, but we are still running the non-TrustedTypes tests on
Firefox.

Solution: instead of skipping tests based on browser name, let's detect
at runtime if the browser supports TrustedTypes or not.

Example failure:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8688958443747938497/+/u/test:_run_suite_firefox-dart2js-canvaskit-canvaskit/stdout
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Feb 27, 2026
@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@mdebbar please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically labels Feb 27, 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 updates the tests for Trusted Types API support in canvaskit_api_tt_on_test.dart. The change replaces browser sniffing, which checked if the browser engine is Blink, with feature detection by checking for the presence of domWindow.trustedTypes. This makes the test execution more reliable across different browsers. As part of this refactoring, an unused import and a related variable have been removed.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 27, 2026
@auto-submit auto-submit Bot merged commit 4a7bcaa into flutter:flutter-3.41-candidate.0 Feb 27, 2026
162 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 2, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 3, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 3, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue engine flutter/engine related. See also e: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants