mirror of
https://github.com/flutter/flutter.git
synced 2026-01-27 12:32:39 +08:00
Revert "[web] - Fix broken TextField in semantics mode when it's a sibling of Navigator" (#142129)
Reverts flutter/flutter#138446 b/322136071
This commit is contained in:
parent
161fd82c7f
commit
b5262f0d80
@ -5569,17 +5569,10 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
|
||||
includeSemantics: false,
|
||||
child: UnmanagedRestorationScope(
|
||||
bucket: bucket,
|
||||
// Generating a semantics node here fixes an issue where widgets rendered
|
||||
// before Navigator mistakenly get their semantics node dropped.
|
||||
// See: https://github.com/flutter/flutter/pull/138446
|
||||
child: Semantics(
|
||||
explicitChildNodes: true,
|
||||
container: true,
|
||||
child: Overlay(
|
||||
key: _overlayKey,
|
||||
clipBehavior: widget.clipBehavior,
|
||||
initialEntries: overlay == null ? _allRouteOverlayEntries.toList(growable: false) : const <OverlayEntry>[],
|
||||
),
|
||||
child: Overlay(
|
||||
key: _overlayKey,
|
||||
clipBehavior: widget.clipBehavior,
|
||||
initialEntries: overlay == null ? _allRouteOverlayEntries.toList(growable: false) : const <OverlayEntry>[],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -960,81 +960,63 @@ void main() {
|
||||
TestSemantics.root(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 1,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 2,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Alert',
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
label: 'Alert',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
label: 'The title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
label: 'The message',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'The title',
|
||||
),
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap
|
||||
],
|
||||
label: 'One',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 13,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap
|
||||
],
|
||||
label: 'Two',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 14,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Cancel',
|
||||
textDirection: TextDirection.ltr,
|
||||
label: 'The message',
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
label: 'One',
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
label: 'Two',
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
label: 'Cancel',
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -1824,7 +1824,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
tester.binding.pipelineOwner.semanticsOwner!.performAction(5, SemanticsAction.decrease);
|
||||
tester.binding.pipelineOwner.semanticsOwner!.performAction(4, SemanticsAction.decrease);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(date, DateTime(2018, 6, 7));
|
||||
|
||||
@ -201,37 +201,33 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute, SemanticsFlag.namesRoute],
|
||||
label: 'Alert',
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute, SemanticsFlag.namesRoute],
|
||||
label: 'Alert',
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(label: 'The Title'),
|
||||
TestSemantics(label: 'Content'),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(label: 'The Title'),
|
||||
TestSemantics(label: 'Content'),
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
label: 'Cancel',
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
label: 'Cancel',
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
label: 'OK',
|
||||
),
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
label: 'OK',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -525,20 +525,15 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isTextField,
|
||||
SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled,],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap,
|
||||
SemanticsAction.didGainAccessibilityFocus,],
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isTextField,
|
||||
SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled,],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap,
|
||||
SemanticsAction.didGainAccessibilityFocus,],
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -553,7 +548,7 @@ void main() {
|
||||
));
|
||||
|
||||
expect(focusNode.hasFocus, isFalse);
|
||||
semanticsOwner.performAction(5, SemanticsAction.didGainAccessibilityFocus);
|
||||
semanticsOwner.performAction(4, SemanticsAction.didGainAccessibilityFocus);
|
||||
await tester.pumpAndSettle();
|
||||
expect(focusNode.hasFocus, isTrue);
|
||||
semantics.dispose();
|
||||
|
||||
@ -2369,41 +2369,37 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics> [
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.isHeader,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.isHeader,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2460,44 +2456,40 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
textDirection: TextDirection.rtl,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
textDirection: TextDirection.rtl,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.isHeader,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 2',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 3',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.isHeader,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 2',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 3',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2545,21 +2537,17 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2606,34 +2594,30 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
),
|
||||
TestSemantics(),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -2679,42 +2663,38 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Leading',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHeader],
|
||||
label: 'Flexible space',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Action 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHeader],
|
||||
label: 'Flexible space',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -2738,28 +2738,24 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'A\nTab 1 of 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'B\nTab 2 of 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'A\nTab 1 of 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'B\nTab 2 of 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -839,31 +839,27 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1015,36 +1011,32 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1092,25 +1084,21 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1118,14 +1106,14 @@ void main() {
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1167,38 +1155,34 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Dialog',
|
||||
label: 'BottomSheet',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'BottomSheet',
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Dismiss',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Dismiss',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Scrim',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -2896,18 +2896,14 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -2949,27 +2945,23 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
tooltip: 'Delete',
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
tooltip: 'Delete',
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
),
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -3013,22 +3005,18 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics> [
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3075,22 +3063,18 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3131,23 +3115,19 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3190,20 +3170,16 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
actions: <SemanticsAction>[],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
actions: <SemanticsAction>[],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3245,17 +3221,13 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[], // Must not be a button when tapping is disabled.
|
||||
actions: <SemanticsAction>[],
|
||||
),
|
||||
],
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[], // Must not be a button when tapping is disabled.
|
||||
actions: <SemanticsAction>[],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3298,22 +3270,18 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3354,18 +3322,14 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
),
|
||||
label: 'test',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -1716,36 +1716,31 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
label: 'title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
// The content semantics does not merge into the semantics
|
||||
// node 4.
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
label: 'content',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
],
|
||||
label: 'action',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
label: 'title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
// The content semantics does not merge into the semantics
|
||||
// node 4.
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
label: 'content',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
],
|
||||
label: 'action',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1887,40 +1882,35 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
// Title semantics does not merge into the semantics
|
||||
// node 4.
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
label: 'title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
// Title semantics does not merge into the semantics
|
||||
// node 4.
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
label: 'title',
|
||||
id: 7,
|
||||
label: 'content',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
label: 'content',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
],
|
||||
label: 'action',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
],
|
||||
label: 'action',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -1330,71 +1330,60 @@ void main() {
|
||||
|
||||
expect(semantics, hasSemantics(TestSemantics.root(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'one',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'two',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'three',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'four',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
label: 'one',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'two',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'three',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'four',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[]
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -214,86 +214,81 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
rect: TestSemantics.fullScreen,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
rect: TestSemantics.fullScreen,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
rect: TestSemantics.fullScreen,
|
||||
id: 9,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, expandedHeight),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, expandedHeight),
|
||||
id: 12,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 13,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 14,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 100.0, 20.0),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isHeader,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, expandedHeight),
|
||||
label: 'Expanded title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 100.0, 20.0),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isHeader,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 15,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollUp],
|
||||
id: 10,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 50.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 3',
|
||||
id: 11,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, expandedHeight),
|
||||
label: 'Expanded title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 14,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollUp],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 50.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -324,109 +319,103 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
rect: TestSemantics.fullScreen,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
rect: TestSemantics.fullScreen,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
rect: TestSemantics.fullScreen,
|
||||
id: 9,
|
||||
// The app bar is collapsed.
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 56.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
// The app bar is collapsed.
|
||||
id: 12,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 56.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 13,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 56.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 14,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 100.0, 20.0),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isHeader,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
// The flexible space bar still persists in the
|
||||
// semantic tree even if it is collapsed.
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 56.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
rect: const Rect.fromLTRB(0.0, 36.0, 800.0, 92.0),
|
||||
label: 'Expanded title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 100.0, 20.0),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isHeader,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
// The flexible space bar still persists in the
|
||||
// semantic tree even if it is collapsed.
|
||||
TestSemantics(
|
||||
id: 15,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollUp, SemanticsAction.scrollDown],
|
||||
id: 10,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 56.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
rect: const Rect.fromLTRB(0.0, 150.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
rect: const Rect.fromLTRB(0.0, 56.0, 800.0, 200.0),
|
||||
label: 'Item 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 16,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 17,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 18,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 50.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 6',
|
||||
id: 11,
|
||||
rect: const Rect.fromLTRB(0.0, 36.0, 800.0, 92.0),
|
||||
label: 'Expanded title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 14,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollUp, SemanticsAction.scrollDown],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
rect: const Rect.fromLTRB(0.0, 150.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
rect: const Rect.fromLTRB(0.0, 56.0, 800.0, 200.0),
|
||||
label: 'Item 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 15,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
label: 'Item 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 16,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 200.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 17,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 50.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isHidden],
|
||||
label: 'Item 6',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -691,24 +691,20 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
tooltip: 'Add Photo',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
tooltip: 'Add Photo',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -680,24 +680,20 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
label: 'link',
|
||||
),
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
label: 'link',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -3355,47 +3355,41 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 600.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 600.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.hasExpandedState,
|
||||
SemanticsFlag.isExpanded,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 120.0, 64.0),
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.hasExpandedState,
|
||||
SemanticsFlag.isExpanded,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 120.0, 64.0),
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 120.0, 48.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
label: 'Item 0',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 120.0, 48.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
label: 'Item 0',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 120.0, 48.0),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3432,26 +3426,20 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 600.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 800.0, 600.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasExpandedState,
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasExpandedState,
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -5428,42 +5428,38 @@ TestSemantics _expectedSemantics() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Abc\nTab 1 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Def\nTab 2 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Ghi\nTab 3 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Jkl\nTab 4 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'body',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Abc\nTab 1 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Def\nTab 2 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Ghi\nTab 3 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Jkl\nTab 4 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'body',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -1122,88 +1122,84 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -1258,44 +1254,40 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'test1\ntest2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'test1\ntest2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -1343,86 +1335,82 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
],
|
||||
label: 'Popup menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasImplicitScrolling,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
],
|
||||
actions: <SemanticsAction>[],
|
||||
label: '2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
],
|
||||
actions: <SemanticsAction>[],
|
||||
label: '2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'Dismiss menu',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -641,90 +641,85 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: routeName,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: routeName,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
id: 6,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
tooltip: 'Back',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.isHeader,
|
||||
if (debugDefaultTargetPlatformOverride != TargetPlatform.iOS &&
|
||||
debugDefaultTargetPlatformOverride != TargetPlatform.macOS) SemanticsFlag.namesRoute,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
if (isDesktop)
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
if (isDesktop)
|
||||
SemanticsAction.didLoseAccessibilityFocus,
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.paste,
|
||||
],
|
||||
label: 'Search',
|
||||
textDirection: TextDirection.ltr,
|
||||
textSelection: const TextSelection(baseOffset: 0, extentOffset: 0),
|
||||
),
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
tooltip: 'Back',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
label: 'FlexibleSpace',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
id: 9,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.isHeader,
|
||||
if (debugDefaultTargetPlatformOverride != TargetPlatform.iOS &&
|
||||
debugDefaultTargetPlatformOverride != TargetPlatform.macOS) SemanticsFlag.namesRoute,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
if (isDesktop)
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
if (isDesktop)
|
||||
SemanticsAction.didLoseAccessibilityFocus,
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.paste,
|
||||
],
|
||||
label: 'Search',
|
||||
textDirection: TextDirection.ltr,
|
||||
textSelection: const TextSelection(baseOffset: 0, extentOffset: 0),
|
||||
),
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
id: 7,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
label: 'FlexibleSpace',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Suggestions',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Suggestions',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -796,64 +791,19 @@ void main() {
|
||||
id: 2,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
id: 7,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: routeName,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.scopesRoute,
|
||||
SemanticsFlag.namesRoute,
|
||||
],
|
||||
label: routeName,
|
||||
textDirection: TextDirection.ltr,
|
||||
id: 9,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
tooltip: 'Back',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.isHeader,
|
||||
if (debugDefaultTargetPlatformOverride != TargetPlatform.iOS &&
|
||||
debugDefaultTargetPlatformOverride != TargetPlatform.macOS) SemanticsFlag.namesRoute,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
if (isDesktop)
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
if (isDesktop)
|
||||
SemanticsAction.didLoseAccessibilityFocus,
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.paste,
|
||||
],
|
||||
label: 'Search',
|
||||
textDirection: TextDirection.ltr,
|
||||
textSelection: const TextSelection(baseOffset: 0, extentOffset: 0),
|
||||
),
|
||||
TestSemantics(
|
||||
id: 15,
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
@ -861,11 +811,51 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Suggestions',
|
||||
tooltip: 'Back',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
SemanticsFlag.isHeader,
|
||||
if (debugDefaultTargetPlatformOverride != TargetPlatform.iOS &&
|
||||
debugDefaultTargetPlatformOverride != TargetPlatform.macOS) SemanticsFlag.namesRoute,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
if (isDesktop)
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
if (isDesktop)
|
||||
SemanticsAction.didLoseAccessibilityFocus,
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.paste,
|
||||
],
|
||||
label: 'Search',
|
||||
textDirection: TextDirection.ltr,
|
||||
textSelection: const TextSelection(baseOffset: 0, extentOffset: 0),
|
||||
),
|
||||
TestSemantics(
|
||||
id: 14,
|
||||
label: 'Bottom',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Suggestions',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -1178,29 +1178,24 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1242,25 +1237,20 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
// isFocusable is delayed by 1 frame.
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
// isFocusable is delayed by 1 frame.
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1290,23 +1280,18 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1359,21 +1344,16 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '50%',
|
||||
increasedValue: '60%',
|
||||
decreasedValue: '40%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '50%',
|
||||
increasedValue: '60%',
|
||||
decreasedValue: '40%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1415,20 +1395,15 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isSlider],
|
||||
value: '50%',
|
||||
increasedValue: '60%',
|
||||
decreasedValue: '40%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isSlider],
|
||||
value: '50%',
|
||||
increasedValue: '60%',
|
||||
decreasedValue: '40%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1476,30 +1451,25 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1541,28 +1511,23 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
// isFocusable is delayed by 1 frame.
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
// isFocusable is delayed by 1 frame.
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1592,26 +1557,21 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1661,21 +1621,16 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '40',
|
||||
increasedValue: '60',
|
||||
decreasedValue: '20',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '40',
|
||||
increasedValue: '60',
|
||||
decreasedValue: '20',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1726,21 +1681,16 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '40',
|
||||
increasedValue: '60',
|
||||
decreasedValue: '20',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '40',
|
||||
increasedValue: '60',
|
||||
decreasedValue: '20',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2569,30 +2519,25 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2607,7 +2552,7 @@ void main() {
|
||||
));
|
||||
|
||||
expect(focusNode.hasFocus, isFalse);
|
||||
semanticsOwner.performAction(5, SemanticsAction.didGainAccessibilityFocus);
|
||||
semanticsOwner.performAction(4, SemanticsAction.didGainAccessibilityFocus);
|
||||
await tester.pumpAndSettle();
|
||||
expect(focusNode.hasFocus, isTrue);
|
||||
semantics.dispose();
|
||||
|
||||
@ -5693,7 +5693,7 @@ void main() {
|
||||
rect: TestSemantics.fullScreen,
|
||||
label: 'PAGE1'
|
||||
),
|
||||
],
|
||||
]
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -742,22 +742,17 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isTextField],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
SemanticsAction.didLoseAccessibilityFocus,
|
||||
],
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isTextField],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
SemanticsAction.didLoseAccessibilityFocus,
|
||||
],
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -772,11 +767,11 @@ void main() {
|
||||
));
|
||||
|
||||
expect(focusNode.hasFocus, isFalse);
|
||||
semanticsOwner.performAction(5, SemanticsAction.didGainAccessibilityFocus);
|
||||
semanticsOwner.performAction(4, SemanticsAction.didGainAccessibilityFocus);
|
||||
await tester.pumpAndSettle();
|
||||
expect(focusNode.hasFocus, isTrue);
|
||||
|
||||
semanticsOwner.performAction(5, SemanticsAction.didLoseAccessibilityFocus);
|
||||
semanticsOwner.performAction(4, SemanticsAction.didLoseAccessibilityFocus);
|
||||
await tester.pumpAndSettle();
|
||||
expect(focusNode.hasFocus, isFalse);
|
||||
semantics.dispose();
|
||||
|
||||
@ -2130,16 +2130,12 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
tooltip: 'Foo',
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
tooltip: 'Foo',
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2175,15 +2171,11 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -1243,16 +1243,12 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
tooltip: 'Foo',
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
tooltip: 'Foo',
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1290,16 +1286,12 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
tooltip: 'Foo',
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
tooltip: 'Foo',
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1339,15 +1331,11 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -1385,15 +1373,11 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
label: 'Bar',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -525,34 +525,30 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
label: 'Signed in\nname\nemail',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
label: 'Signed in\nname\nemail',
|
||||
label: r'B',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'C',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'D',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: r'Show accounts',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: r'B',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'C',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'D',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isButton],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: r'Show accounts',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -611,27 +607,23 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
label: 'Signed in',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Signed in',
|
||||
label: r'B',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'C',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'D',
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: r'B',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'C',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: r'D',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -39,66 +39,63 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 2,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(id: 3, children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
label: '0 - 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
label: '0 - 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
label: '0 - 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
label: '1 - 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
label: '1 - 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
label: '1 - 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
label: '2 - 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
label: '2 - 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 13,
|
||||
label: '2 - 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
label: '0 - 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
label: '0 - 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
label: '0 - 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
label: '1 - 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
label: '1 - 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
label: '1 - 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
label: '2 - 0',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 11,
|
||||
label: '2 - 1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 12,
|
||||
label: '2 - 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
expect(semantics, hasSemantics(expected, ignoreRect: true, ignoreTransform: true));
|
||||
semantics.dispose();
|
||||
});
|
||||
|
||||
@ -3268,44 +3268,39 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
id: 9,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollLeft],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollLeft],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'Target',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'H',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'V',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'N',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
id: 5,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'Target',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'H',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'V',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'N',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3342,39 +3337,34 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
id: 9,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 10,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'Target',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'H',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'V',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
/// N is moved offscreen.
|
||||
],
|
||||
id: 5,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'Target',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'H',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'V',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
/// N is moved offscreen.
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -4577,19 +4577,15 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isObscured,
|
||||
],
|
||||
value: expectedValue,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isObscured,
|
||||
],
|
||||
value: expectedValue,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -4636,18 +4632,14 @@ void main() {
|
||||
TestSemantics(
|
||||
children:<TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
],
|
||||
value: originalText,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
],
|
||||
value: originalText,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -4689,30 +4681,26 @@ void main() {
|
||||
TestSemantics(
|
||||
children:<TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isObscured,
|
||||
SemanticsFlag.isFocused,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.moveCursorBackwardByCharacter,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.moveCursorBackwardByWord,
|
||||
],
|
||||
value: expectedValue,
|
||||
textDirection: TextDirection.ltr,
|
||||
// Focusing a single-line field on web selects it.
|
||||
textSelection: kIsWeb
|
||||
? const TextSelection(baseOffset: 0, extentOffset: 24)
|
||||
: const TextSelection.collapsed(offset: 24),
|
||||
),
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isObscured,
|
||||
SemanticsFlag.isFocused,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.moveCursorBackwardByCharacter,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.moveCursorBackwardByWord,
|
||||
],
|
||||
value: expectedValue,
|
||||
textDirection: TextDirection.ltr,
|
||||
// Focusing a single-line field on web selects it.
|
||||
textSelection: kIsWeb
|
||||
? const TextSelection(baseOffset: 0, extentOffset: 24)
|
||||
: const TextSelection.collapsed(offset: 24),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -4914,7 +4902,7 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
final SemanticsOwner owner = tester.binding.pipelineOwner.semanticsOwner!;
|
||||
const int expectedNodeId = 6;
|
||||
const int expectedNodeId = 5;
|
||||
|
||||
expect(
|
||||
semantics,
|
||||
@ -4929,31 +4917,26 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics.rootChild(
|
||||
id: expectedNodeId,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.moveCursorBackwardByCharacter,
|
||||
SemanticsAction.moveCursorBackwardByWord,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.copy,
|
||||
SemanticsAction.cut,
|
||||
SemanticsAction.paste,
|
||||
],
|
||||
value: 'test',
|
||||
textSelection: TextSelection.collapsed(offset: controller.text.length),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics.rootChild(
|
||||
id: expectedNodeId,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.moveCursorBackwardByCharacter,
|
||||
SemanticsAction.moveCursorBackwardByWord,
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
SemanticsAction.copy,
|
||||
SemanticsAction.cut,
|
||||
SemanticsAction.paste,
|
||||
],
|
||||
value: 'test',
|
||||
textSelection: TextSelection.collapsed(offset: controller.text.length),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -5001,7 +4984,7 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
final SemanticsOwner owner = tester.binding.pipelineOwner.semanticsOwner!;
|
||||
const int expectedNodeId = 6;
|
||||
const int expectedNodeId = 5;
|
||||
|
||||
expect(controller.value.selection.isCollapsed, isTrue);
|
||||
|
||||
@ -5042,7 +5025,7 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
final SemanticsOwner owner = tester.binding.pipelineOwner.semanticsOwner!;
|
||||
const int expectedNodeId = 5;
|
||||
const int expectedNodeId = 4;
|
||||
|
||||
expect(
|
||||
semantics,
|
||||
@ -5057,25 +5040,20 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics.rootChild(
|
||||
id: expectedNodeId,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
],
|
||||
textSelection: TextSelection.collapsed(offset: controller.text.length),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics.rootChild(
|
||||
id: expectedNodeId,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isTextField,
|
||||
SemanticsFlag.isFocused,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.setSelection,
|
||||
SemanticsAction.setText,
|
||||
],
|
||||
textSelection: TextSelection.collapsed(offset: controller.text.length),
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -5235,38 +5235,6 @@ void main() {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
testWidgets('Navigator does not hide semantics node of its sibling', (WidgetTester tester) async {
|
||||
final SemanticsTester semantics = SemanticsTester(tester);
|
||||
const MaterialPage<void> page = MaterialPage<void>(child: Text('page'));
|
||||
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Stack(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
Semantics(
|
||||
label: 'layer#1',
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Container(),
|
||||
),
|
||||
SizedBox(
|
||||
height: 100,
|
||||
width: 100,
|
||||
child: Navigator(
|
||||
pages: const <Page<void>>[page],
|
||||
onPopPage: (_, __) => false
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
|
||||
expect(semantics, includesNodeWith(label: 'layer#1'));
|
||||
|
||||
semantics.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
typedef AnnouncementCallBack = void Function(Route<dynamic>?);
|
||||
|
||||
@ -1700,37 +1700,32 @@ void main() {
|
||||
rect: TestSemantics.fullScreen,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 2,
|
||||
id: 6,
|
||||
rect: TestSemantics.fullScreen,
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
rect: TestSemantics.fullScreen,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
label: 'Hello World',
|
||||
rect: TestSemantics.fullScreen,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 9,
|
||||
label: 'Hello World',
|
||||
rect: TestSemantics.fullScreen,
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'test label',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
// Modal barrier is put after modal scope
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.dismiss],
|
||||
label: 'test label',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -243,30 +243,26 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'Line one',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Line two',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Button',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
label: 'Line one',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'Line two',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.hasEnabledState,
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Button',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -2544,33 +2544,29 @@ void main() {
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollUp],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
actions: <SemanticsAction>[SemanticsAction.scrollUp],
|
||||
actions: <SemanticsAction>[SemanticsAction.longPress],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[SemanticsAction.longPress],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: 'onscreen\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isHidden,
|
||||
SemanticsFlag.isLink,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'off screen',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
label: 'onscreen\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isHidden,
|
||||
SemanticsFlag.isLink,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'off screen',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -2598,7 +2594,7 @@ void main() {
|
||||
|
||||
// Test shows on screen.
|
||||
expect(controller.offset, 0.0);
|
||||
tester.binding.pipelineOwner.semanticsOwner!.performAction(9, SemanticsAction.showOnScreen);
|
||||
tester.binding.pipelineOwner.semanticsOwner!.performAction(8, SemanticsAction.showOnScreen);
|
||||
await tester.pumpAndSettle();
|
||||
expect(controller.offset != 0.0, isTrue);
|
||||
|
||||
|
||||
@ -118,37 +118,32 @@ void _tests() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
id: 7,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 8,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasImplicitScrolling],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'Plain text',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 7,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasCheckedState, SemanticsFlag.isChecked, SemanticsFlag.isSelected],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.decrease],
|
||||
label: '\u202aInteractive text\u202c',
|
||||
value: 'test-value',
|
||||
increasedValue: 'test-increasedValue',
|
||||
decreasedValue: 'test-decreasedValue',
|
||||
hint: 'test-hint',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
],
|
||||
id: 5,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
label: 'Plain text',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
id: 6,
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasCheckedState, SemanticsFlag.isChecked, SemanticsFlag.isSelected],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.decrease],
|
||||
label: '\u202aInteractive text\u202c',
|
||||
value: 'test-value',
|
||||
increasedValue: 'test-increasedValue',
|
||||
decreasedValue: 'test-decreasedValue',
|
||||
hint: 'test-hint',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -63,20 +63,14 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 3,
|
||||
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 600.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
rect: const Rect.fromLTWH(0.0, 0.0, 800.0, 600.0),
|
||||
flags: <SemanticsFlag>[SemanticsFlag.scopesRoute],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
label: 'Hello!',
|
||||
textDirection: TextDirection.ltr,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 10.0, 10.0),
|
||||
transform: Matrix4.translationValues(395.0, 295.0, 0.0),
|
||||
),
|
||||
],
|
||||
label: 'Hello!',
|
||||
textDirection: TextDirection.ltr,
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 10.0, 10.0),
|
||||
transform: Matrix4.translationValues(395.0, 295.0, 0.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -296,7 +296,7 @@ void main() {
|
||||
expect(result.passed, false);
|
||||
expect(
|
||||
result.reason,
|
||||
'SemanticsNode#5(Rect.fromLTRB(300.0, 200.0, 500.0, 400.0), '
|
||||
'SemanticsNode#4(Rect.fromLTRB(300.0, 200.0, 500.0, 400.0), '
|
||||
'label: "this is a test", textDirection: ltr):\n'
|
||||
'Expected contrast ratio of at least 4.5 but found 1.17 for a font '
|
||||
'size of 14.0.\n'
|
||||
@ -328,7 +328,7 @@ void main() {
|
||||
expect(result.passed, false);
|
||||
expect(
|
||||
result.reason,
|
||||
'SemanticsNode#5(Rect.fromLTRB(300.0, 200.0, 500.0, 400.0), '
|
||||
'SemanticsNode#4(Rect.fromLTRB(300.0, 200.0, 500.0, 400.0), '
|
||||
'label: "this is a test", textDirection: ltr):\n'
|
||||
'Expected contrast ratio of at least 4.5 but found 1.19 for a font '
|
||||
'size of 14.0.\n'
|
||||
@ -715,7 +715,7 @@ void main() {
|
||||
expect(result.passed, false);
|
||||
expect(
|
||||
result.reason,
|
||||
'SemanticsNode#5(Rect.fromLTRB(376.0, 276.5, 424.0, 323.5), '
|
||||
'SemanticsNode#4(Rect.fromLTRB(376.0, 276.5, 424.0, 323.5), '
|
||||
'actions: [tap]): expected tap '
|
||||
'target size of at least Size(48.0, 48.0), '
|
||||
'but found Size(48.0, 47.0)\n'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user