microbenchmarks: single-line JSON; consolidate #7433 workaround (#7450)

- output single-line JSON because iOS 9.x cannot output more than one line
- move the workaround for #7433 into LiveTestWidgetsFlutterBinding so that it works in all cases (e.g. animation_bench.dart on iOS)
This commit is contained in:
Yegor
2017-01-11 14:29:21 -08:00
committed by GitHub
parent a27192fe67
commit 0c7a9da98f
5 changed files with 6 additions and 9 deletions

View File

@@ -632,6 +632,8 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
super.handleBeginFrame(rawTimeStamp);
if (_expectingFrame) {
assert(_pendingFrame != null);
// TODO(yjbanov): workaroud for https://github.com/flutter/flutter/issues/7433
Timer.run(() {}); // forces runtime to flush Completer.complete() microtask
_pendingFrame.complete(); // unlocks the test API
_pendingFrame = null;
_expectingFrame = false;