Repository navigation
[CP-stable] Migrate Safari tests to macOS 26 - #195437
auto-submit[bot] merged 1 commit into
Conversation
|
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 the macOS builder environment version from Mac-15.7 to Mac-26.6 and adjusts Safari-specific test assertions in text_editing_test.dart and style_manager_test.dart to handle rendering differences. Feedback on the changes suggests simplifying the assertion in style_manager_test.dart by always allowing the unfocused outline value on Safari, which avoids potential test flakiness introduced by dynamically checking domDocument.hasFocus().
| // In WebKit, `:focus` does not match when the Safari window lacks | ||
| // OS-level WindowServer focus (`!domDocument.hasFocus()`), returning | ||
| // the initial unfocused outline width (`medium` = `3px`) with `none`. | ||
| if (isSafari && !domDocument.hasFocus()) '3px none rgb(0, 0, 0)', |
There was a problem hiding this comment.
Checking domDocument.hasFocus() dynamically during test initialization can introduce flakiness. If the OS window focus changes during the test run or if there is a race condition, the test might fail because the expected list was constructed based on an outdated focus state. It is more robust to always allow the unfocused outline value ('3px none rgb(0, 0, 0)') on Safari, regardless of the instantaneous focus state of the document.
| if (isSafari && !domDocument.hasFocus()) '3px none rgb(0, 0, 0)', | |
| if (isSafari) '3px none rgb(0, 0, 0)', |
89c39ed
into
flutter:flutter-3.47-candidate.0
Issue Link:
What is the link to the issue this cherry-pick is addressing?
#193833, #193834
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.
CI test-only change to migrate tests to macOS 26. This is a partial cherry-pick of #193681, only including the parts required for macOS 26.
Changelog Description:
Explain this cherry pick:
See best practices for examples.
N/A - CI test-only change
Workaround:
Is there a workaround for this issue?
Rerun test
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?
Run in CI