user32/tests: Fix the menu capture test for NT4.

This commit is contained in:
Alexandre Julliard 2010-02-05 11:29:12 +01:00
parent 4f1604e92d
commit 30e1445f08
1 changed files with 11 additions and 3 deletions

View File

@ -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 */ /* check that re-setting the capture for the menu fails */
set_cap_wnd = SetCapture(cap_wnd); 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 */ /* check that SetCapture fails for another window and that it does not touch the error code */
set_cap_wnd = SetCapture(hWnd); 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 */ /* check that ReleaseCapture fails and does not touch the error code */
status = ReleaseCapture(); status = ReleaseCapture();
@ -2764,8 +2770,10 @@ static void test_capture_4(void)
HINSTANCE hInstance = GetModuleHandleA( NULL ); HINSTANCE hInstance = GetModuleHandleA( NULL );
if (!pGetGUIThreadInfo) if (!pGetGUIThreadInfo)
{
win_skip("GetGUIThreadInfo is not available\n"); win_skip("GetGUIThreadInfo is not available\n");
return;
}
wclass.lpszClassName = "TestCapture4Class"; wclass.lpszClassName = "TestCapture4Class";
wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.style = CS_HREDRAW | CS_VREDRAW;
wclass.lpfnWndProc = test_capture_4_proc; wclass.lpfnWndProc = test_capture_4_proc;