[EditableText] honor the "brieflyShowPassword" system setting (#97769)

This commit is contained in:
LongCatIsLooong
2022-02-08 17:50:20 -08:00
committed by GitHub
parent 9eb94c59b8
commit 63f48d1ff8
4 changed files with 103 additions and 12 deletions

View File

@@ -127,6 +127,18 @@ void main() {
);
});
testWidgets('TestWindow can fake brieflyShowPassword', (WidgetTester tester) async {
verifyThatTestWindowCanFakeProperty<bool>(
tester: tester,
realValue: ui.window.brieflyShowPassword,
fakeValue: !ui.window.brieflyShowPassword,
propertyRetriever: () => WidgetsBinding.instance!.window.brieflyShowPassword,
propertyFaker: (TestWidgetsFlutterBinding binding, bool fakeValue) {
binding.window.brieflyShowPasswordTestValue = fakeValue;
},
);
});
testWidgets('TestWindow can fake default route name', (WidgetTester tester) async {
verifyThatTestWindowCanFakeProperty<String>(
tester: tester,