Unverified Commit e154298e authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Roll engine to 96f5f5b96c7220ffc8c4ce22ed895616a15ad3a0 (#19615)

parent 3bff2e46
482469bad8094ff05fd66dfc07149fbef4ae00ac 96f5f5b96c7220ffc8c4ce22ed895616a15ad3a0
...@@ -347,10 +347,10 @@ void _defineTests() { ...@@ -347,10 +347,10 @@ void _defineTests() {
), ),
), ),
)); ));
final Set<SemanticsAction> allActions = SemanticsAction.values.values.toSet() final Set<SemanticsAction> allActions = SemanticsAction.values.values.toSet()
..remove(SemanticsAction.customAction) // customAction is not user-exposed. ..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; const int expectedId = 2;
final TestSemantics expectedSemantics = new TestSemantics.root( final TestSemantics expectedSemantics = new TestSemantics.root(
...@@ -420,7 +420,13 @@ void _defineTests() { ...@@ -420,7 +420,13 @@ void _defineTests() {
), ),
), ),
)); ));
// TODO(jonahwilliams): update when the following semantics flags are added.
final List<SemanticsFlag> flags = SemanticsFlag.values.values.toList();
flags
..remove(SemanticsFlag.isImage)
..remove(SemanticsFlag.hasToggledState)
..remove(SemanticsFlag.isToggled)
..remove(SemanticsFlag.isLiveRegion);
final TestSemantics expectedSemantics = new TestSemantics.root( final TestSemantics expectedSemantics = new TestSemantics.root(
children: <TestSemantics>[ children: <TestSemantics>[
new TestSemantics.rootChild( new TestSemantics.rootChild(
...@@ -429,7 +435,7 @@ void _defineTests() { ...@@ -429,7 +435,7 @@ void _defineTests() {
new TestSemantics.rootChild( new TestSemantics.rootChild(
id: 2, id: 2,
rect: TestSemantics.fullScreen, rect: TestSemantics.fullScreen,
flags: SemanticsFlag.values.values.toList(), flags: flags,
), ),
] ]
), ),
......
...@@ -416,7 +416,8 @@ void main() { ...@@ -416,7 +416,8 @@ void main() {
final Set<SemanticsAction> allActions = SemanticsAction.values.values.toSet() final Set<SemanticsAction> allActions = SemanticsAction.values.values.toSet()
..remove(SemanticsAction.customAction) // customAction is not user-exposed. ..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; const int expectedId = 1;
final TestSemantics expectedSemantics = new TestSemantics.root( final TestSemantics expectedSemantics = new TestSemantics.root(
...@@ -478,12 +479,19 @@ void main() { ...@@ -478,12 +479,19 @@ void main() {
namesRoute: true, namesRoute: true,
) )
); );
// TODO(jonahwilliams): update when the following semantics flags are added.
final List<SemanticsFlag> flags = SemanticsFlag.values.values.toList();
flags
..remove(SemanticsFlag.isImage)
..remove(SemanticsFlag.hasToggledState)
..remove(SemanticsFlag.isToggled)
..remove(SemanticsFlag.isLiveRegion);
TestSemantics expectedSemantics = new TestSemantics.root( TestSemantics expectedSemantics = new TestSemantics.root(
children: <TestSemantics>[ children: <TestSemantics>[
new TestSemantics.rootChild( new TestSemantics.rootChild(
rect: TestSemantics.fullScreen, rect: TestSemantics.fullScreen,
flags: SemanticsFlag.values.values.toList(), flags: flags,
), ),
], ],
); );
......
...@@ -321,6 +321,10 @@ Matcher matchesSemanticsData({ ...@@ -321,6 +321,10 @@ Matcher matchesSemanticsData({
bool namesRoute = false, bool namesRoute = false,
bool scopesRoute = false, bool scopesRoute = false,
bool isHidden = false, bool isHidden = false,
bool isImage = false,
bool isLiveRegion = false,
bool hasToggledState = false,
bool isToggled = false,
// Actions // // Actions //
bool hasTapAction = false, bool hasTapAction = false,
bool hasLongPressAction = false, bool hasLongPressAction = false,
...@@ -340,6 +344,7 @@ Matcher matchesSemanticsData({ ...@@ -340,6 +344,7 @@ Matcher matchesSemanticsData({
bool hasDidGainAccessibilityFocusAction = false, bool hasDidGainAccessibilityFocusAction = false,
bool hasDidLoseAccessibilityFocusAction = false, bool hasDidLoseAccessibilityFocusAction = false,
bool hasCustomAction = false, bool hasCustomAction = false,
bool hasDismissAction = false,
}) { }) {
final List<SemanticsFlag> flags = <SemanticsFlag>[]; final List<SemanticsFlag> flags = <SemanticsFlag>[];
if (hasCheckedState) if (hasCheckedState)
...@@ -370,6 +375,14 @@ Matcher matchesSemanticsData({ ...@@ -370,6 +375,14 @@ Matcher matchesSemanticsData({
flags.add(SemanticsFlag.scopesRoute); flags.add(SemanticsFlag.scopesRoute);
if (isHidden) if (isHidden)
flags.add(SemanticsFlag.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<SemanticsAction> actions = <SemanticsAction>[]; final List<SemanticsAction> actions = <SemanticsAction>[];
if (hasTapAction) if (hasTapAction)
...@@ -408,6 +421,8 @@ Matcher matchesSemanticsData({ ...@@ -408,6 +421,8 @@ Matcher matchesSemanticsData({
actions.add(SemanticsAction.didLoseAccessibilityFocus); actions.add(SemanticsAction.didLoseAccessibilityFocus);
if (hasCustomAction) if (hasCustomAction)
actions.add(SemanticsAction.customAction); actions.add(SemanticsAction.customAction);
if (hasDismissAction)
actions.add(SemanticsAction.dismiss);
return new _MatchesSemanticsData( return new _MatchesSemanticsData(
label: label, label: label,
......
...@@ -454,6 +454,10 @@ void main() { ...@@ -454,6 +454,10 @@ void main() {
namesRoute: true, namesRoute: true,
scopesRoute: true, scopesRoute: true,
isHidden: true, isHidden: true,
isImage: true,
isLiveRegion: true,
hasToggledState: true,
isToggled: true,
/* Actions */ /* Actions */
hasTapAction: true, hasTapAction: true,
hasLongPressAction: true, hasLongPressAction: true,
...@@ -473,6 +477,7 @@ void main() { ...@@ -473,6 +477,7 @@ void main() {
hasDidGainAccessibilityFocusAction: true, hasDidGainAccessibilityFocusAction: true,
hasDidLoseAccessibilityFocusAction: true, hasDidLoseAccessibilityFocusAction: true,
hasCustomAction: true, hasCustomAction: true,
hasDismissAction: true,
)); ));
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment