Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/OpenSlideSharp.Viewer.Tests/SlideViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ public void SlideView_SwitchSlide_DisposesOldLoader()
TileLoader oldLoader = host.View.Loader!;
TileCache oldCache = host.View.Cache!;
TileBitmapCache oldBitmaps = host.View.Bitmaps!;
Assert.True(oldCache.Count > 0 && oldBitmaps.Count > 0);
// Bitmaps are made when a frame is drawn, which can come after the last tile has loaded.
HeadlessSession.PumpUntil(() => oldBitmaps.Count > 0, "a frame is drawn with the loaded tiles");
Assert.True(oldCache.Count > 0);
var key = new TileKey(0, 0, 0);
Assert.True(oldCache.TryGet(key, out TileImage? tile));
Bitmap bitmap = oldBitmaps.Get(key, tile!)!;
Expand Down
Loading