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() {
),
),
));
final Set<SemanticsAction> 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<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(
children: <TestSemantics>[
new TestSemantics.rootChild(
......@@ -429,7 +435,7 @@ void _defineTests() {
new TestSemantics.rootChild(
id: 2,
rect: TestSemantics.fullScreen,
flags: SemanticsFlag.values.values.toList(),
flags: flags,
),
]
),
......
......@@ -416,7 +416,8 @@ void main() {
final Set<SemanticsAction> 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<SemanticsFlag> flags = SemanticsFlag.values.values.toList();
flags
..remove(SemanticsFlag.isImage)
..remove(SemanticsFlag.hasToggledState)
..remove(SemanticsFlag.isToggled)
..remove(SemanticsFlag.isLiveRegion);
TestSemantics expectedSemantics = new TestSemantics.root(
children: <TestSemantics>[
new TestSemantics.rootChild(
rect: TestSemantics.fullScreen,
flags: SemanticsFlag.values.values.toList(),
flags: flags,
),
],
);
......
......@@ -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<SemanticsFlag> flags = <SemanticsFlag>[];
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<SemanticsAction> actions = <SemanticsAction>[];
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,
......
......@@ -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,
));
});
});
......
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