Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/user32/tests/cursoricon.c | 2 ++ dlls/user32/tests/static.c | 1 + dlls/user32/tests/sysparams.c | 3 ++- dlls/user32/tests/win.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 61b32e01b6..211376b180 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1070,6 +1070,8 @@ static void test_LoadImageBitmap(const char * test_desc, HBITMAP hbm) ok(ret == bm.bmHeight, "%s: %d lines were converted, not %d\n", test_desc, ret, bm.bmHeight);
ok(color_match(pixel, 0x00ffffff), "%s: Pixel is 0x%08x\n", test_desc, pixel); + + ReleaseDC(NULL, hdc); }
static void test_LoadImageFile(const char * test_desc, const unsigned char * image_data, diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c index 929b50d694..8776c3a9e0 100644 --- a/dlls/user32/tests/static.c +++ b/dlls/user32/tests/static.c @@ -99,6 +99,7 @@ static void test_updates(int style, int flags) HDC hdc = GetDC( hStatic); COLORREF colour = GetPixel( hdc, 10, 10); ok ( colour != 0, "pixel should NOT be painted black!\n"); + ReleaseDC(hStatic, hdc); } if (style != SS_ETCHEDHORZ && style != SS_ETCHEDVERT) exp = 4; diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index fa473c163a..5dd8e58ba5 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -2918,7 +2918,8 @@ static void test_GetSystemMetrics( void) trace( "Captionfontchar width %d MenuFont %d,%d CaptionWidth from registry: %d screen %d,%d\n", avcwCaption, tmMenuFont.tmHeight, tmMenuFont.tmExternalLeading, CaptionWidthfromreg, screen.cx, screen.cy); } - ReleaseDC( 0, hdc); + + DeleteDC(hdc); }
static void test_EnumDisplaySettings(void) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 6e72cbc28a..db27b6b755 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -5242,6 +5242,7 @@ static void test_scrolldc( HWND parent) if (winetest_debug > 0) dump_region(hrgn);
/* clean up */ + ReleaseDC(hwnd1, hdc); DeleteObject(hrgn); DeleteObject(exprgn); DeleteObject(tmprgn);
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at https://testbot.winehq.org/JobDetails.pl?Key=34763
Your paranoid android.
=== w8 (32 bit sysparams) === sysparams.c:2519: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2530: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1
=== w864 (32 bit sysparams) === sysparams.c:291: SPI_SETSCREENSAVETIMEOUT failed for reason: 329. Indicating test failure and skipping remainder of test sysparams.c:292: Test failed: SystemParametersInfoA: rc=0 err=329 sysparams.c:292: Test failed: SystemParametersInfoA: rc=0 err=329 sysparams.c:2519: Test failed: Waiting for the WM_DISPLAYCHANGE message timed out sysparams.c:2530: Test failed: Set bpp 32, but WM_DISPLAYCHANGE reported bpp -1