@@ -490,12 +490,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
490
490
}
491
491
492
492
Future <Null > _runTestBody (Future <Null > testBody (), VoidCallback invariantTester) async {
493
- // Delay this function by a microtask.
494
- // Otherwise it will open a scope immediately, which is then open when
495
- // the `asyncBarrier` is invoked. The `asyncBarrier` is immediately
496
- // following the call to `testZone.runBinary(_runTestBody)`, so delaying
497
- // by one microtask is enough to ensure that the timing is correct.
498
- await new Future <Null >.microtask (() {});
499
493
assert (inTest);
500
494
501
495
runApp (new Container (key: new UniqueKey (), child: _preTestMessage)); // Reset the tree to a known state.
@@ -773,12 +767,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
773
767
});
774
768
775
769
return new Future <Null >.microtask (() async {
776
- // Run all queued microtasks.
777
- await new Future <Null >.microtask (() {});
778
- // When the test had an exception, the test-framework already
779
- // ran the teardown functions, removing the _fakeAsync function.
780
- if (_fakeAsync == null )
781
- return null ;
782
770
// Resolve interplay between fake async and real async calls.
783
771
_fakeAsync.flushMicrotasks ();
784
772
while (_pendingAsyncTasks != null ) {
@@ -995,13 +983,6 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
995
983
996
984
@override
997
985
void handleBeginFrame (Duration rawTimeStamp) {
998
- // Don't run this function when `handleBeginFrame` was invoked
999
- // immediately before without a call of `handleDrawFrame` in between.
1000
- // TODO(floitsch): Remove this line when the spurious calls from the
1001
- // framework don't happen anymore. See
1002
- // https://github.com/flutter/flutter/issues/17963
1003
- if (_doDrawThisFrame != null )
1004
- return ;
1005
986
assert (_doDrawThisFrame == null );
1006
987
if (_expectingFrame ||
1007
988
(framePolicy == LiveTestWidgetsFlutterBindingFramePolicy .fullyLive) ||
@@ -1016,13 +997,6 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
1016
997
1017
998
@override
1018
999
void handleDrawFrame () {
1019
- // Don't run this function when `handleBeginFrame` wasn't invoked
1020
- // immediately before.
1021
- // TODO(floitsch): Remove this line when the spurious calls from the
1022
- // framework don't happen anymore. See
1023
- // https://github.com/flutter/flutter/issues/17963
1024
- if (_doDrawThisFrame == null )
1025
- return ;
1026
1000
assert (_doDrawThisFrame != null );
1027
1001
if (_doDrawThisFrame)
1028
1002
super .handleDrawFrame ();
0 commit comments