Unverified Commit d41eeeb5 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Include tags in SemanticsNode debug properties (#35491)

parent 4ca7bfa0
......@@ -2082,6 +2082,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
}
properties.add(DiagnosticsProperty<Rect>('rect', rect, description: description, showName: false));
}
properties.add(IterableProperty<String>('tags', tags?.map((SemanticsTag tag) => tag.name), defaultValue: null));
final List<String> actions = _actions.keys.map<String>((SemanticsAction action) => describeEnum(action)).toList()..sort();
final List<String> customSemanticsActions = _customSemanticsActions.keys
.map<String>((CustomSemanticsAction action) => action.label)
......
......@@ -435,6 +435,7 @@ void main() {
' isMergedIntoParent: false\n'
' mergeAllDescendantsIntoThisNode: false\n'
' Rect.fromLTRB(0.0, 0.0, 0.0, 0.0)\n'
' tags: null\n'
' actions: []\n'
' customActions: []\n'
' flags: []\n'
......@@ -530,6 +531,7 @@ void main() {
' isMergedIntoParent: false\n'
' mergeAllDescendantsIntoThisNode: false\n'
' Rect.fromLTRB(0.0, 0.0, 0.0, 0.0)\n'
' tags: null\n'
' actions: customAction\n'
' customActions: action1, action2, action3\n'
' flags: []\n'
......@@ -551,7 +553,16 @@ void main() {
' elevation: 0.0\n'
' thickness: 0.0\n',
);
});
test('Tags show up in debug properties', () {
final SemanticsNode actionNode = SemanticsNode()
..tags = <SemanticsTag>{RenderViewport.useTwoPaneSemantics};
expect(
actionNode.toStringDeep(),
contains('\n tags: RenderViewport.twoPane\n'),
);
});
test('SemanticsConfiguration getter/setter', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment