Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
47711cc6
Commit
47711cc6
authored
May 19, 2008
by
James Hawkins
Committed by
Alexandre Julliard
May 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix a few tests that fail in win2k3.
parent
617d8fee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
broadcast.c
dlls/user32/tests/broadcast.c
+16
-4
No files found.
dlls/user32/tests/broadcast.c
View file @
47711cc6
...
@@ -264,6 +264,10 @@ static void test_noprivileges(void)
...
@@ -264,6 +264,10 @@ static void test_noprivileges(void)
DWORD
recips
;
DWORD
recips
;
BOOL
ret
;
BOOL
ret
;
static
const
DWORD
BSM_ALL_RECIPS
=
BSM_VXDS
|
BSM_NETDRIVER
|
BSM_INSTALLABLEDRIVERS
|
BSM_APPLICATIONS
|
BSM_ALLDESKTOPS
;
pOpenProcessToken
=
(
void
*
)
GetProcAddress
(
advapi32
,
"OpenProcessToken"
);
pOpenProcessToken
=
(
void
*
)
GetProcAddress
(
advapi32
,
"OpenProcessToken"
);
pAdjustTokenPrivileges
=
(
void
*
)
GetProcAddress
(
advapi32
,
"AdjustTokenPrivileges"
);
pAdjustTokenPrivileges
=
(
void
*
)
GetProcAddress
(
advapi32
,
"AdjustTokenPrivileges"
);
if
(
!
pOpenProcessToken
||
!
pAdjustTokenPrivileges
||
!
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_ADJUST_PRIVILEGES
,
&
token
))
if
(
!
pOpenProcessToken
||
!
pAdjustTokenPrivileges
||
!
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_ADJUST_PRIVILEGES
,
&
token
))
...
@@ -285,7 +289,9 @@ static void test_noprivileges(void)
...
@@ -285,7 +289,9 @@ static void test_noprivileges(void)
todo_wine
ok
(
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
,
"Last error: %08x
\n
"
,
GetLastError
());
todo_wine
ok
(
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
,
"Last error: %08x
\n
"
,
GetLastError
());
ok
(
ret
==
1
,
"Returned: %d
\n
"
,
ret
);
ok
(
ret
==
1
,
"Returned: %d
\n
"
,
ret
);
ok
(
WaitForSingleObject
(
hevent
,
0
)
!=
WAIT_TIMEOUT
,
"Asynchronous message sent instead
\n
"
);
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
);
PulseEvent
(
hevent
);
/* Wine sets last error to 0, so just use that one as token here so it doesn't fail */
/* 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)
...
@@ -296,7 +302,9 @@ static void test_noprivileges(void)
ok
(
!
GetLastError
(),
"Last error: %08x
\n
"
,
GetLastError
());
ok
(
!
GetLastError
(),
"Last error: %08x
\n
"
,
GetLastError
());
ok
(
ret
==
1
,
"Returned: %d
\n
"
,
ret
);
ok
(
ret
==
1
,
"Returned: %d
\n
"
,
ret
);
ok
(
WaitForSingleObject
(
hevent
,
0
)
!=
WAIT_TIMEOUT
,
"Asynchronous message sent instead
\n
"
);
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
);
PulseEvent
(
hevent
);
SetLastError
(
0xcafebabe
);
SetLastError
(
0xcafebabe
);
...
@@ -306,7 +314,9 @@ static void test_noprivileges(void)
...
@@ -306,7 +314,9 @@ static void test_noprivileges(void)
todo_wine
ok
(
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
,
"Last error: %08x
\n
"
,
GetLastError
());
todo_wine
ok
(
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
,
"Last error: %08x
\n
"
,
GetLastError
());
ok
(
ret
==
1
,
"Returned: %d
\n
"
,
ret
);
ok
(
ret
==
1
,
"Returned: %d
\n
"
,
ret
);
ok
(
WaitForSingleObject
(
hevent
,
0
)
!=
WAIT_TIMEOUT
,
"Asynchronous message sent instead
\n
"
);
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
);
PulseEvent
(
hevent
);
SetLastError
(
0xcafebabe
);
SetLastError
(
0xcafebabe
);
...
@@ -316,7 +326,9 @@ static void test_noprivileges(void)
...
@@ -316,7 +326,9 @@ static void test_noprivileges(void)
todo_wine
ok
(
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
,
"Last error: %08x
\n
"
,
GetLastError
());
todo_wine
ok
(
GetLastError
()
==
ERROR_PRIVILEGE_NOT_HELD
,
"Last error: %08x
\n
"
,
GetLastError
());
ok
(
!
ret
,
"Returned: %d
\n
"
,
ret
);
ok
(
!
ret
,
"Returned: %d
\n
"
,
ret
);
ok
(
WaitForSingleObject
(
hevent
,
0
)
!=
WAIT_TIMEOUT
,
"Asynchronous message sent instead
\n
"
);
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
);
PulseEvent
(
hevent
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment