Repository navigation
[web] fix race in the image_loading_integration.dart test - #92303
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| /// Notifies that Image.asset used in the test app loaded the image. | ||
| Future<void> get whenAssetImageLoads => _assetImageCompleter.future; | ||
|
|
||
| /// Notifies that Image.network used in the test app loaded the image. | ||
| Future<void> get whenNetworkImageLoads => _networkImageCompleter.future; |
There was a problem hiding this comment.
These being global scares me a bit. Maybe we should create a new completer for every invocation of main? Is it even possible for main to be called multiple times?
There was a problem hiding this comment.
This is a one-off test that checks something very specific. I think we can pay the cost of more flexible design if/when we decide that this test should do more than it does today.
Fix flakiness in the image_loading_integration.dart test by waiting for the images to load over the network before checking the DOM.
Progress towards #86375