From 0702d31c81b2cd9267d68b003670a6fe2791386e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 9 Jan 2012 16:40:28 +0100 Subject: [PATCH] user32/tests: Fix some test failures on Windows. --- dlls/user32/tests/msg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 6f40a0b0e84..42f4c4f62c4 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -13497,7 +13497,7 @@ static const struct message WmSetFocus_1[] = { { WM_QUERYNEWPALETTE, sent|wparam|lparam|parent|optional, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|parent, 0, SWP_NOSIZE|SWP_NOMOVE }, { WM_ACTIVATEAPP, sent|wparam|parent, 1 }, - { WM_NCACTIVATE, sent|wparam|parent, 1 }, + { WM_NCACTIVATE, sent|parent }, { WM_GETTEXT, sent|defwinproc|parent|optional }, { WM_GETTEXT, sent|defwinproc|parent|optional }, { WM_ACTIVATE, sent|wparam|parent, 1 }, @@ -13573,7 +13573,8 @@ static void test_SetFocus(void) SetLastError(0xdeadbeef); old_focus = SetFocus((HWND)0xdeadbeef); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), + "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessage(&msg); ok_sequence(WmEmptySeq, "SetFocus on an invalid window", FALSE); ok(old_focus == 0, "expected old focus 0, got %p\n", old_focus); @@ -13602,7 +13603,8 @@ static void test_SetFocus(void) SetLastError(0xdeadbeef); old_active = SetActiveWindow((HWND)0xdeadbeef); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || broken(GetLastError() == 0xdeadbeef), + "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) DispatchMessage(&msg); ok_sequence(WmEmptySeq, "SetActiveWindow on an invalid window", FALSE); ok(old_active == 0, "expected old focus 0, got %p\n", old_active);