Skip to content

Commit 697701b

Browse files
Even more awaits (#184042)
Fixes #184315 Part of #181513 --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
1 parent c6a7406 commit 697701b

60 files changed

Lines changed: 153 additions & 147 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev/benchmarks/complex_layout/test_driver/scroll_perf_bad_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ void main() {
1717
await driver.waitUntilFirstFrameRasterized();
1818
});
1919

20-
tearDownAll(() async {
21-
driver.close();
22-
});
20+
tearDownAll(driver.close);
2321

2422
Future<void> testScrollPerf(String listKey, String summaryName) async {
2523
// The slight initial delay avoids starting the timing during a

dev/benchmarks/complex_layout/test_driver/scroll_perf_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ void main() {
1717
await driver.waitUntilFirstFrameRasterized();
1818
});
1919

20-
tearDownAll(() async {
21-
driver.close();
22-
});
20+
tearDownAll(driver.close);
2321

2422
Future<void> testScrollPerf(String listKey, String summaryName) async {
2523
// The slight initial delay avoids starting the timing during a

dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ void main() {
3333
driver = await FlutterDriver.connect(printCommunication: true);
3434
});
3535

36-
tearDownAll(() async {
37-
driver.close();
38-
});
36+
tearDownAll(driver.close);
3937

4038
test('initial tree creation', () async {
4139
// Let app become fully idle.

dev/benchmarks/macrobenchmarks/test/fullscreen_textfield_perf_e2e.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void main() {
1515
pageDelay: const Duration(seconds: 1),
1616
body: (WidgetController controller) async {
1717
final Finder textfield = find.byKey(const ValueKey<String>('fullscreen-textfield'));
18-
controller.tap(textfield);
18+
await controller.tap(textfield);
1919
await Future<void>.delayed(const Duration(milliseconds: 5000));
2020
},
2121
);

dev/benchmarks/macrobenchmarks/test/textfield_perf_e2e.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void main() {
1515
pageDelay: const Duration(seconds: 1),
1616
body: (WidgetController controller) async {
1717
final Finder textfield = find.byKey(const ValueKey<String>('basic-textfield'));
18-
controller.tap(textfield);
18+
await controller.tap(textfield);
1919
// Caret should be cached, so repeated blinking should not require recompute.
2020
await Future<void>.delayed(const Duration(milliseconds: 5000));
2121
},

dev/benchmarks/macrobenchmarks/test_driver/util.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Future<void> runDriverTestForRoute(String routeName, DriverTestCallBack body) as
3232

3333
await body(driver);
3434

35-
driver.close();
35+
await driver.close();
3636
}
3737

3838
void macroPerfTest(

dev/benchmarks/microbenchmarks/lib/foundation/all_elements_bench.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Future<void> execute() async {
4141
);
4242

4343
// Lists may not be scrolled into frame in landscape.
44-
SystemChrome.setPreferredOrientations(<DeviceOrientation>[
44+
await SystemChrome.setPreferredOrientations(<DeviceOrientation>[
4545
DeviceOrientation.portraitUp,
4646
DeviceOrientation.portraitDown,
4747
]);

dev/benchmarks/platform_views_layout/test_driver/scroll_perf_ad_banners_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ void main() {
1515
await driver.waitUntilFirstFrameRasterized();
1616
});
1717

18-
tearDownAll(() async {
19-
driver.close();
20-
});
18+
tearDownAll(driver.close);
2119

2220
Future<void> testScrollPerf(String listKey, String summaryName) async {
2321
// The slight initial delay avoids starting the timing during a

dev/benchmarks/platform_views_layout/test_driver/scroll_perf_bottom_ad_banner_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ void main() {
1515
await driver.waitUntilFirstFrameRasterized();
1616
});
1717

18-
tearDownAll(() async {
19-
driver.close();
20-
});
18+
tearDownAll(driver.close);
2119

2220
Future<void> testScrollPerf(String listKey, String summaryName) async {
2321
// The slight initial delay avoids starting the timing during a

dev/benchmarks/platform_views_layout/test_driver/scroll_perf_hcpp_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ void main() {
1515
await driver.waitUntilFirstFrameRasterized();
1616
});
1717

18-
tearDownAll(() async {
19-
driver.close();
20-
});
18+
tearDownAll(driver.close);
2119

2220
Future<void> testScrollPerf(String listKey, String summaryName) async {
2321
// The slight initial delay avoids starting the timing during a

0 commit comments

Comments
 (0)