Module: wine Branch: master Commit: 30e1445f085df28f398f02ed41efc2cd078e3da1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=30e1445f085df28f398f02ed41... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Feb 5 11:29:12 2010 +0100 user32/tests: Fix the menu capture test for NT4. --- dlls/user32/tests/win.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index c92b3ed..615cb2a 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;