fix microbenchmarks on iOS (#7429)

This commit is contained in:
Yegor
2017-01-10 18:16:00 -08:00
committed by GitHub
parent 7a10ed9315
commit 42ccffca36
6 changed files with 117 additions and 79 deletions

View File

@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';

View File

@@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
@@ -20,6 +21,7 @@ Future<Null> main() async {
await benchmarkWidgets((WidgetTester tester) async {
stocks.main();
await tester.pump(); // Start startup animation
new Timer(const Duration(milliseconds: 1100), () { }); // workaround for https://github.com/flutter/flutter/issues/7433
await tester.pump(const Duration(seconds: 1)); // Complete startup animation
await tester.tapAt(new Point(20.0, 20.0)); // Open drawer
await tester.pump(); // Start drawer animation

View File

@@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
@@ -19,6 +20,7 @@ Future<Null> main() async {
await benchmarkWidgets((WidgetTester tester) async {
stocks.main();
await tester.pump(); // Start startup animation
new Timer(const Duration(milliseconds: 1100), () { }); // workaround for https://github.com/flutter/flutter/issues/7433
await tester.pump(const Duration(seconds: 1)); // Complete startup animation
await tester.tapAt(new Point(20.0, 20.0)); // Open drawer
await tester.pump(); // Start drawer animation