Make debugSemantics available to profile mode (#58620)
This commit is contained in:
@@ -190,6 +190,7 @@ Future<void> runDemos(List<String> demos, FlutterDriver driver) async {
|
||||
}
|
||||
|
||||
void main([List<String> args = const <String>[]]) {
|
||||
final bool withSemantics = args.contains('--with_semantics');
|
||||
group('flutter gallery transitions', () {
|
||||
FlutterDriver driver;
|
||||
setUpAll(() async {
|
||||
@@ -197,8 +198,7 @@ void main([List<String> args = const <String>[]]) {
|
||||
|
||||
// Wait for the first frame to be rasterized.
|
||||
await driver.waitUntilFirstFrameRasterized();
|
||||
|
||||
if (args.contains('--with_semantics')) {
|
||||
if (withSemantics) {
|
||||
print('Enabeling semantics...');
|
||||
await driver.setSemantics(true);
|
||||
}
|
||||
@@ -214,6 +214,12 @@ void main([List<String> args = const <String>[]]) {
|
||||
await driver.close();
|
||||
});
|
||||
|
||||
test('find.bySemanticsLabel', () async {
|
||||
// Assert that we can use semantics related finders in profile mode.
|
||||
final int id = await driver.getSemanticsId(find.bySemanticsLabel('Material'));
|
||||
expect(id, greaterThan(-1));
|
||||
}, skip: !withSemantics);
|
||||
|
||||
test('all demos', () async {
|
||||
// Collect timeline data for just a limited set of demos to avoid OOMs.
|
||||
final Timeline timeline = await driver.traceAction(
|
||||
|
||||
Reference in New Issue
Block a user