forked from flutter/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flutter_test] Use defaultTargetPlatform for key events simulation (#…
…143579) ## Description This PRs changes the default value for the `platform` parameter used to simulate key events. With this PR, the default value is "web" on web, otherwise it is the operating system name retrieved from `defaultTargetPlatform`. Previously, for methods in `WidgetController`, it defaulted to â��webâ�� on web, and â��androidâ�� everywhere else. And for methods in `KeyEventSimulator` it defaulted to â��webâ�� on web, and the operating system that the test was running on everywhere else. Because the operating system was based on `Platform.operatingSystem`, it usually differed from the target platform the test was running on. AFAIK, the `platform` parameter is only meaningful for simulating `RawKeyEvent`. Once `RawKeyboard` will be fully removed, the `platform` parameter wonâ��t be needed. @gspencergoog In the meantime, do you think it is worth merging this fix? ## Related Issue Fixes to flutter/flutter#133955 ## Tests Adds one test.
- Loading branch information
Showing
3 changed files
with
55 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters