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
6 changes: 4 additions & 2 deletions tests/desktop/tray_unread_icon_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ TEST(TrayUnreadIcon, ReleasesIconsAndHandlesInvalidInputs) {
const auto before = ::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS);
const auto user_before = ::GetGuiResources(::GetCurrentProcess(), GR_USEROBJECTS);
for (int i = 0; i < 200; ++i) ASSERT_TRUE(create_tray_unread_icon(original, 24));
EXPECT_EQ(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS), before);
EXPECT_EQ(::GetGuiResources(::GetCurrentProcess(), GR_USEROBJECTS), user_before);
// Process-wide graphics caches can release older objects during this loop.
// A decrease is harmless; leaked per-icon objects would grow after 200 calls.
EXPECT_LE(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS), before);
EXPECT_LE(::GetGuiResources(::GetCurrentProcess(), GR_USEROBJECTS), user_before);
}

TEST(TrayUnreadIcon, CanSetClearAndShutDownNativeTray) {
Expand Down
Loading