From 30e1445f085df28f398f02ed41efc2cd078e3da1 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 5 Feb 2010 11:29:12 +0100 Subject: [PATCH] user32/tests: Fix the menu capture test for NT4. --- dlls/user32/tests/win.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index c92b3ed73e3..615cb2a076e 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2720,11 +2720,17 @@ static LRESULT CALLBACK test_capture_4_proc(HWND hWnd, UINT msg, WPARAM wParam, /* check that re-setting the capture for the menu fails */ set_cap_wnd = SetCapture(cap_wnd); - ok(!set_cap_wnd, "SetCapture should have failed!\n"); + ok(!set_cap_wnd || broken(set_cap_wnd == cap_wnd), /* nt4 */ + "SetCapture should have failed!\n"); + if (set_cap_wnd) + { + DestroyWindow(hWnd); + break; + } /* check that SetCapture fails for another window and that it does not touch the error code */ set_cap_wnd = SetCapture(hWnd); - ok(!set_cap_wnd, "ReleaseCapture should have failed!\n"); + ok(!set_cap_wnd, "SetCapture should have failed!\n"); /* check that ReleaseCapture fails and does not touch the error code */ status = ReleaseCapture(); @@ -2764,8 +2770,10 @@ static void test_capture_4(void) HINSTANCE hInstance = GetModuleHandleA( NULL ); if (!pGetGUIThreadInfo) + { win_skip("GetGUIThreadInfo is not available\n"); - + return; + } wclass.lpszClassName = "TestCapture4Class"; wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.lpfnWndProc = test_capture_4_proc; -- 2.11.4.GIT