Allow the SceneBuilder, PictureRecord, and Canvas constructor calls from the rendering layer to be hooked (#147271)

This also includes some minor cleanup of documentation, asserts, and tests.
This commit is contained in:
Ian Hickson
2024-04-24 17:19:24 -07:00
committed by GitHub
parent c22ed980d0
commit 9751d4d002
7 changed files with 213 additions and 25 deletions

View File

@@ -53,6 +53,9 @@ void main() {
group('the group with retry flag', () {
testWidgets('the test inside it', (WidgetTester tester) async {
addTearDown(() => retried = true);
if (!retried) {
debugPrint('DISREGARD NEXT FAILURE, IT IS EXPECTED');
}
expect(retried, isTrue);
});
}, retry: 1);
@@ -62,6 +65,9 @@ void main() {
bool retried = false;
testWidgets('the test with retry flag', (WidgetTester tester) async {
addTearDown(() => retried = true);
if (!retried) {
debugPrint('DISREGARD NEXT FAILURE, IT IS EXPECTED');
}
expect(retried, isTrue);
}, retry: 1);
});
@@ -557,6 +563,7 @@ void main() {
};
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
debugPrint('DISREGARD NEXT PENDING TIMER LIST, IT IS EXPECTED');
await binding.runTest(() async {
final Timer timer = Timer(const Duration(seconds: 1), () {});
expect(timer.isActive, true);