deflake image_painting_event_test (#80871)

This commit is contained in:
Dan Field 2021-04-21 10:21:28 -07:00 committed by GitHub
parent 1f8e9ff7a7
commit 362eefeeca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,10 @@ void main() {
test('Image painting events - deduplicates across frames', () async {
final Completer<Event> completer = Completer<Event>();
vmService.onExtensionEvent.first.then(completer.complete);
vmService
.onExtensionEvent
.firstWhere((Event event) => event.extensionKind == 'Flutter.ImageSizesForFrame')
.then(completer.complete);
final ui.Image image = await createTestImage(width: 300, height: 300);
final TestCanvas canvas = TestCanvas();
@ -76,7 +79,10 @@ void main() {
test('Image painting events - deduplicates across frames', () async {
final Completer<Event> completer = Completer<Event>();
vmService.onExtensionEvent.first.then(completer.complete);
vmService
.onExtensionEvent
.firstWhere((Event event) => event.extensionKind == 'Flutter.ImageSizesForFrame')
.then(completer.complete);
final ui.Image image = await createTestImage(width: 300, height: 300);
final TestCanvas canvas = TestCanvas();