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
3326cad0
Commit
3326cad0
authored
Nov 06, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add tests for MsgWaitForMultipleObjectsEx.
parent
ebd1b86b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
msg.c
dlls/user32/tests/msg.c
+36
-0
No files found.
dlls/user32/tests/msg.c
View file @
3326cad0
...
...
@@ -4542,6 +4542,11 @@ static const struct message WmZOrder[] = {
{
0
}
};
static
void
CALLBACK
apc_test_proc
(
ULONG_PTR
param
)
{
/* nothing */
}
static
void
test_MsgWaitForMultipleObjects
(
HWND
hwnd
)
{
DWORD
ret
;
...
...
@@ -4583,6 +4588,37 @@ static void test_MsgWaitForMultipleObjects(HWND hwnd)
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
/* MWMO_INPUTAVAILABLE should succeed even if the message was already seen */
PostMessageA
(
hwnd
,
WM_USER
,
0
,
0
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
ret
=
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
0
,
QS_POSTMESSAGE
,
MWMO_INPUTAVAILABLE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjectsEx returned %x
\n
"
,
ret
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
/* without MWMO_ALERTABLE the result is never WAIT_IO_COMPLETION */
ret
=
QueueUserAPC
(
apc_test_proc
,
GetCurrentThread
(),
0
);
ok
(
ret
,
"QueueUserAPC failed %u
\n
"
,
GetLastError
());
ret
=
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
0
,
QS_POSTMESSAGE
,
0
);
ok
(
ret
==
WAIT_TIMEOUT
,
"MsgWaitForMultipleObjectsEx returned %x
\n
"
,
ret
);
/* but even with MWMO_ALERTABLE window events are preferred */
PostMessageA
(
hwnd
,
WM_USER
,
0
,
0
);
ret
=
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
0
,
QS_POSTMESSAGE
,
MWMO_ALERTABLE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjectsEx returned %x
\n
"
,
ret
);
ok
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
/* the APC call is still queued */
ret
=
MsgWaitForMultipleObjectsEx
(
0
,
NULL
,
0
,
QS_POSTMESSAGE
,
MWMO_ALERTABLE
);
ok
(
ret
==
WAIT_IO_COMPLETION
,
"MsgWaitForMultipleObjectsEx returned %x
\n
"
,
ret
);
}
/* test if we receive the right sequence of messages */
...
...
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