Unverified Commit 1bdba68d authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Force benchmark app to portrait (#112502)

parent 9e95f5f7
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart'; import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart' show collectAllElementsFrom; import 'package:flutter_test/flutter_test.dart' show collectAllElementsFrom;
import '../common.dart'; import '../common.dart';
...@@ -42,6 +43,12 @@ Future<void> main() async { ...@@ -42,6 +43,12 @@ Future<void> main() async {
), ),
)); ));
// Lists may not be scrolled into frame in landscape.
SystemChrome.setPreferredOrientations(<DeviceOrientation>[
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
// Wait for frame rendering to stabilize. // Wait for frame rendering to stabilize.
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
await SchedulerBinding.instance.endOfFrame; await SchedulerBinding.instance.endOfFrame;
......
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