Unverified Commit e84b4c47 authored by sjindel-google's avatar sjindel-google Committed by GitHub

Allow all tests to run with --update-goldens. (#31562)

Previously benchmark_test.dart would break if run with --update-goldens.
Now the entire test suite can be run with --update-goldens.
parent 48207838
......@@ -1106,12 +1106,6 @@ enum LiveTestWidgetsFlutterBindingFramePolicy {
/// doesn't trigger a paint, since then you could not see anything
/// anyway.)
class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
@override
void initInstances() {
super.initInstances();
assert(!autoUpdateGoldenFiles);
}
@override
bool get inTest => _inTest;
bool _inTest = false;
......
......@@ -124,7 +124,6 @@ class TrivialComparator implements GoldenFileComparator {
@override
Future<void> update(Uri golden, Uint8List imageBytes) {
// [autoUpdateGoldenFiles] should never be set in a live widget binding.
throw StateError('goldenFileComparator has not been initialized');
}
}
......
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