Module: wine Branch: master Commit: 47711cc62e3d1621da01541fc5ea9fe0385743f9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=47711cc62e3d1621da01541fc5...
Author: James Hawkins jhawkins@codeweavers.com Date: Mon May 19 02:24:52 2008 -0500
user32: Fix a few tests that fail in win2k3.
---
dlls/user32/tests/broadcast.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/tests/broadcast.c b/dlls/user32/tests/broadcast.c index 786df7d..6cf27b8 100644 --- a/dlls/user32/tests/broadcast.c +++ b/dlls/user32/tests/broadcast.c @@ -264,6 +264,10 @@ static void test_noprivileges(void) DWORD recips; BOOL ret;
+ static const DWORD BSM_ALL_RECIPS = BSM_VXDS | BSM_NETDRIVER | + BSM_INSTALLABLEDRIVERS | + BSM_APPLICATIONS | BSM_ALLDESKTOPS; + pOpenProcessToken = (void *)GetProcAddress(advapi32, "OpenProcessToken"); pAdjustTokenPrivileges = (void *)GetProcAddress(advapi32, "AdjustTokenPrivileges"); if (!pOpenProcessToken || !pAdjustTokenPrivileges || !pOpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &token)) @@ -285,7 +289,9 @@ static void test_noprivileges(void) todo_wine ok(GetLastError() == ERROR_PRIVILEGE_NOT_HELD, "Last error: %08x\n", GetLastError()); ok(ret==1, "Returned: %d\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == BSM_ALLDESKTOPS, "Received by: %08x\n", recips); + ok(recips == BSM_ALLDESKTOPS || + recips == BSM_ALL_RECIPS, /* win2k3 */ + "Received by: %08x\n", recips); PulseEvent(hevent);
/* Wine sets last error to 0, so just use that one as token here so it doesn't fail */ @@ -296,7 +302,9 @@ static void test_noprivileges(void) ok(!GetLastError(), "Last error: %08x\n", GetLastError()); ok(ret==1, "Returned: %d\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == BSM_ALLCOMPONENTS, "Received by: %08x\n", recips); + ok(recips == BSM_ALLCOMPONENTS || + recips == BSM_ALL_RECIPS, /* win2k3 */ + "Received by: %08x\n", recips); PulseEvent(hevent);
SetLastError(0xcafebabe); @@ -306,7 +314,9 @@ static void test_noprivileges(void) todo_wine ok(GetLastError() == ERROR_PRIVILEGE_NOT_HELD, "Last error: %08x\n", GetLastError()); ok(ret==1, "Returned: %d\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == (BSM_ALLDESKTOPS|BSM_APPLICATIONS), "Received by: %08x\n", recips); + ok(recips == (BSM_ALLDESKTOPS|BSM_APPLICATIONS) || + recips == BSM_APPLICATIONS, /* win2k3 */ + "Received by: %08x\n", recips); PulseEvent(hevent);
SetLastError(0xcafebabe); @@ -316,7 +326,9 @@ static void test_noprivileges(void) todo_wine ok(GetLastError() == ERROR_PRIVILEGE_NOT_HELD, "Last error: %08x\n", GetLastError()); ok(!ret, "Returned: %d\n", ret); ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n"); - ok(recips == (BSM_ALLDESKTOPS|BSM_APPLICATIONS), "Received by: %08x\n", recips); + ok(recips == (BSM_ALLDESKTOPS|BSM_APPLICATIONS) || + recips == BSM_APPLICATIONS, /* win2k3 */ + "Received by: %08x\n", recips); PulseEvent(hevent); }