Commit 8d5fe6d4 authored by Florian Loitsch's avatar Florian Loitsch Committed by GitHub

Don't use `runBinaryGuarded`. (#11816)

Since the called function can't throw, there is no need for the "guarded".
Since the function returns something, running in guarded mode doesn't really work. The `uncaught` handler wouldn't know what to return (except for `null`).
parent a7d2f835
...@@ -439,7 +439,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase ...@@ -439,7 +439,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
); );
_parentZone = Zone.current; _parentZone = Zone.current;
final Zone testZone = _parentZone.fork(specification: errorHandlingZoneSpecification); final Zone testZone = _parentZone.fork(specification: errorHandlingZoneSpecification);
testZone.runBinaryGuarded(_runTestBody, testBody, invariantTester) testZone.runBinary(_runTestBody, testBody, invariantTester)
.whenComplete(_testCompletionHandler); .whenComplete(_testCompletionHandler);
asyncBarrier(); // When using AutomatedTestWidgetsFlutterBinding, this flushes the microtasks. asyncBarrier(); // When using AutomatedTestWidgetsFlutterBinding, this flushes the microtasks.
return _currentTestCompleter.future; return _currentTestCompleter.future;
......
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