Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ec2621f7
Unverified
Commit
ec2621f7
authored
Aug 03, 2022
by
Michael Goderbauer
Committed by
GitHub
Aug 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force a11y services to off for complex_layout_semantics_perf test (#108906)
parent
c6aeaa30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
semantics_perf_test.dart
...marks/complex_layout/test_driver/semantics_perf_test.dart
+31
-1
No files found.
dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart
View file @
ec2621f7
...
...
@@ -15,6 +15,21 @@ void main() {
late
FlutterDriver
driver
;
setUpAll
(()
async
{
// Turn off any accessibility services that may be running. The purpose of
// the test is to measure the time it takes to create the initial
// semantics tree in isolation. If accessibility services are on, the
// semantics tree gets generated during the first frame and we can't
// measure it in isolation.
final
Process
run
=
await
Process
.
start
(
_adbPath
(),
const
<
String
>[
'shell'
,
'settings'
,
'put'
,
'secure'
,
'enabled_accessibility_services'
,
'null'
,
]);
await
run
.
exitCode
;
driver
=
await
FlutterDriver
.
connect
(
printCommunication:
true
);
});
...
...
@@ -31,7 +46,13 @@ void main() {
await
driver
.
forceGC
();
final
Timeline
timeline
=
await
driver
.
traceAction
(()
async
{
expect
(
await
driver
.
setSemantics
(
true
),
isTrue
);
expect
(
await
driver
.
setSemantics
(
true
),
isTrue
,
reason:
'Could not toggle semantics to on because semantics were already '
'on, but the test needs to toggle semantics to measure the initial '
'semantics tree generation in isolation.'
);
});
final
Iterable
<
TimelineEvent
>?
semanticsEvents
=
timeline
.
events
?.
where
((
TimelineEvent
event
)
=>
event
.
name
==
'SEMANTICS'
);
...
...
@@ -45,3 +66,12 @@ void main() {
},
timeout:
Timeout
.
none
);
});
}
String
_adbPath
(
)
{
final
String
?
androidHome
=
Platform
.
environment
[
'ANDROID_HOME'
]
??
Platform
.
environment
[
'ANDROID_SDK_ROOT'
];
if
(
androidHome
==
null
)
{
return
'adb'
;
}
else
{
return
p
.
join
(
androidHome
,
'platform-tools'
,
'adb'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment