From e154298e0ba9144ab5763659725586f0bd24e5f5 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Sat, 21 Jul 2018 00:45:16 -0700 Subject: [PATCH] Roll engine to 96f5f5b96c7220ffc8c4ce22ed895616a15ad3a0 (#19615) --- bin/internal/engine.version | 2 +- .../flutter/test/widgets/custom_painter_test.dart | 14 ++++++++++---- packages/flutter/test/widgets/semantics_test.dart | 12 ++++++++++-- packages/flutter_test/lib/src/matchers.dart | 15 +++++++++++++++ packages/flutter_test/test/matchers_test.dart | 5 +++++ 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/bin/internal/engine.version b/bin/internal/engine.version index 5688ddbb19..7503dd1beb 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -482469bad8094ff05fd66dfc07149fbef4ae00ac +96f5f5b96c7220ffc8c4ce22ed895616a15ad3a0 diff --git a/packages/flutter/test/widgets/custom_painter_test.dart b/packages/flutter/test/widgets/custom_painter_test.dart index 625f53ec8e..f6bf54e76e 100644 --- a/packages/flutter/test/widgets/custom_painter_test.dart +++ b/packages/flutter/test/widgets/custom_painter_test.dart @@ -347,10 +347,10 @@ void _defineTests() { ), ), )); - final Set allActions = SemanticsAction.values.values.toSet() ..remove(SemanticsAction.customAction) // customAction is not user-exposed. - ..remove(SemanticsAction.showOnScreen); // showOnScreen is not user-exposed. + ..remove(SemanticsAction.showOnScreen) // showOnScreen is not user-exposed + ..remove(SemanticsAction.dismiss); // TODO(jonahwilliams): update when dismiss is exposed. const int expectedId = 2; final TestSemantics expectedSemantics = new TestSemantics.root( @@ -420,7 +420,13 @@ void _defineTests() { ), ), )); - + // TODO(jonahwilliams): update when the following semantics flags are added. + final List flags = SemanticsFlag.values.values.toList(); + flags + ..remove(SemanticsFlag.isImage) + ..remove(SemanticsFlag.hasToggledState) + ..remove(SemanticsFlag.isToggled) + ..remove(SemanticsFlag.isLiveRegion); final TestSemantics expectedSemantics = new TestSemantics.root( children: [ new TestSemantics.rootChild( @@ -429,7 +435,7 @@ void _defineTests() { new TestSemantics.rootChild( id: 2, rect: TestSemantics.fullScreen, - flags: SemanticsFlag.values.values.toList(), + flags: flags, ), ] ), diff --git a/packages/flutter/test/widgets/semantics_test.dart b/packages/flutter/test/widgets/semantics_test.dart index 7f44f4fe8f..befd4f6d3c 100644 --- a/packages/flutter/test/widgets/semantics_test.dart +++ b/packages/flutter/test/widgets/semantics_test.dart @@ -416,7 +416,8 @@ void main() { final Set allActions = SemanticsAction.values.values.toSet() ..remove(SemanticsAction.customAction) // customAction is not user-exposed. - ..remove(SemanticsAction.showOnScreen); // showOnScreen is not user-exposed. + ..remove(SemanticsAction.showOnScreen) // showOnScreen is not user-exposed + ..remove(SemanticsAction.dismiss); // TODO(jonahwilliams): remove when dismiss action is exposed. const int expectedId = 1; final TestSemantics expectedSemantics = new TestSemantics.root( @@ -478,12 +479,19 @@ void main() { namesRoute: true, ) ); + // TODO(jonahwilliams): update when the following semantics flags are added. + final List flags = SemanticsFlag.values.values.toList(); + flags + ..remove(SemanticsFlag.isImage) + ..remove(SemanticsFlag.hasToggledState) + ..remove(SemanticsFlag.isToggled) + ..remove(SemanticsFlag.isLiveRegion); TestSemantics expectedSemantics = new TestSemantics.root( children: [ new TestSemantics.rootChild( rect: TestSemantics.fullScreen, - flags: SemanticsFlag.values.values.toList(), + flags: flags, ), ], ); diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index cee3039949..58c862195a 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart @@ -321,6 +321,10 @@ Matcher matchesSemanticsData({ bool namesRoute = false, bool scopesRoute = false, bool isHidden = false, + bool isImage = false, + bool isLiveRegion = false, + bool hasToggledState = false, + bool isToggled = false, // Actions // bool hasTapAction = false, bool hasLongPressAction = false, @@ -340,6 +344,7 @@ Matcher matchesSemanticsData({ bool hasDidGainAccessibilityFocusAction = false, bool hasDidLoseAccessibilityFocusAction = false, bool hasCustomAction = false, + bool hasDismissAction = false, }) { final List flags = []; if (hasCheckedState) @@ -370,6 +375,14 @@ Matcher matchesSemanticsData({ flags.add(SemanticsFlag.scopesRoute); if (isHidden) flags.add(SemanticsFlag.isHidden); + if (isImage) + flags.add(SemanticsFlag.isImage); + if (isLiveRegion) + flags.add(SemanticsFlag.isLiveRegion); + if (hasToggledState) + flags.add(SemanticsFlag.hasToggledState); + if (isToggled) + flags.add(SemanticsFlag.isToggled); final List actions = []; if (hasTapAction) @@ -408,6 +421,8 @@ Matcher matchesSemanticsData({ actions.add(SemanticsAction.didLoseAccessibilityFocus); if (hasCustomAction) actions.add(SemanticsAction.customAction); + if (hasDismissAction) + actions.add(SemanticsAction.dismiss); return new _MatchesSemanticsData( label: label, diff --git a/packages/flutter_test/test/matchers_test.dart b/packages/flutter_test/test/matchers_test.dart index 6fc73d53da..82af1672bd 100644 --- a/packages/flutter_test/test/matchers_test.dart +++ b/packages/flutter_test/test/matchers_test.dart @@ -454,6 +454,10 @@ void main() { namesRoute: true, scopesRoute: true, isHidden: true, + isImage: true, + isLiveRegion: true, + hasToggledState: true, + isToggled: true, /* Actions */ hasTapAction: true, hasLongPressAction: true, @@ -473,6 +477,7 @@ void main() { hasDidGainAccessibilityFocusAction: true, hasDidLoseAccessibilityFocusAction: true, hasCustomAction: true, + hasDismissAction: true, )); }); });