Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c3b30e53
Commit
c3b30e53
authored
Mar 14, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add several more MsgWaitForMultipleObjects tests and split them out from…
user32: Add several more MsgWaitForMultipleObjects tests and split them out from the main message tests.
parent
8620d15d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
16 deletions
+44
-16
msg.c
dlls/user32/tests/msg.c
+44
-16
No files found.
dlls/user32/tests/msg.c
View file @
c3b30e53
...
@@ -3625,6 +3625,49 @@ static const struct message WmSetIcon_2[] = {
...
@@ -3625,6 +3625,49 @@ static const struct message WmSetIcon_2[] = {
{
0
}
{
0
}
};
};
static
void
test_MsgWaitForMultipleObjects
(
HWND
hwnd
)
{
DWORD
ret
;
MSG
msg
;
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_TIMEOUT
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
PostMessageA
(
hwnd
,
WM_USER
,
0
,
0
);
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
ok
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_TIMEOUT
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
PostMessageA
(
hwnd
,
WM_USER
,
0
,
0
);
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
ok
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
/* shows QS_POSTMESSAGE flag is cleared in the PeekMessage call */
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_TIMEOUT
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
PostMessageA
(
hwnd
,
WM_USER
,
0
,
0
);
/* new incoming message causes it to become signaled again */
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
ok
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
ok
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
}
/* test if we receive the right sequence of messages */
/* test if we receive the right sequence of messages */
static
void
test_messages
(
void
)
static
void
test_messages
(
void
)
{
{
...
@@ -3632,7 +3675,6 @@ static void test_messages(void)
...
@@ -3632,7 +3675,6 @@ static void test_messages(void)
HWND
hchild2
,
hbutton
;
HWND
hchild2
,
hbutton
;
HMENU
hmenu
;
HMENU
hmenu
;
MSG
msg
;
MSG
msg
;
DWORD
ret
;
flush_sequence
();
flush_sequence
();
...
@@ -3921,21 +3963,7 @@ static void test_messages(void)
...
@@ -3921,21 +3963,7 @@ static void test_messages(void)
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
flush_sequence
();
flush_sequence
();
/* MsgWaitForMultipleObjects test */
test_MsgWaitForMultipleObjects
(
hparent
);
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_TIMEOUT
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
PostMessageA
(
hparent
,
WM_USER
,
0
,
0
);
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_OBJECT_0
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
ok
(
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
),
"PeekMessage should succeed
\n
"
);
ok
(
msg
.
message
==
WM_USER
,
"got %04x instead of WM_USER
\n
"
,
msg
.
message
);
ret
=
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
0
,
QS_POSTMESSAGE
);
ok
(
ret
==
WAIT_TIMEOUT
,
"MsgWaitForMultipleObjects returned %x
\n
"
,
ret
);
/* end of MsgWaitForMultipleObjects test */
/* the following test causes an exception in user.exe under win9x */
/* the following test causes an exception in user.exe under win9x */
if
(
!
PostMessageW
(
hparent
,
WM_USER
,
0
,
0
))
if
(
!
PostMessageW
(
hparent
,
WM_USER
,
0
,
0
))
...
...
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