[CP-beta][web] Fix failure on Firefox 148#182981
Conversation
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
|
@mdebbar please fill out the PR description above, afterwards the release team will review this request. |
|
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. |
There was a problem hiding this comment.
Code Review
This pull request updates a CanvasKit test related to Trusted Types. It replaces a browser engine check with direct feature detection for the Trusted Types API by checking domWindow.trustedTypes. This makes the test conditions more accurate and less dependent on the browser engine. An unused import and a related variable have also been removed.
e9e4fda
into
flutter:flutter-3.42-candidate.0
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:
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?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
What are the steps to validate that this fix works?
Notice no more failures in CI.