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
0170bc3e
Commit
0170bc3e
authored
May 24, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Add a test to check the queue status if there is a pending
posted message and the quit flag is set.
parent
e902cd11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
1 deletion
+57
-1
msg.c
dlls/user/tests/msg.c
+57
-1
No files found.
dlls/user/tests/msg.c
View file @
0170bc3e
...
...
@@ -6363,7 +6363,12 @@ static void test_winevents(void)
/****** start of MOUSE_LL hook test *************/
hCBT_global_hook
=
SetWindowsHookExA
(
WH_MOUSE_LL
,
cbt_global_hook_proc
,
GetModuleHandleA
(
0
),
0
);
assert
(
hCBT_global_hook
);
/* WH_MOUSE_LL is not supported on Win9x platforms */
if
(
!
hCBT_global_hook
)
{
trace
(
"Skipping WH_MOUSE_LL test on this platform
\n
"
);
goto
skip_mouse_ll_hook_test
;
}
hevent
=
CreateEventA
(
NULL
,
0
,
0
,
NULL
);
assert
(
hevent
);
...
...
@@ -6393,6 +6398,7 @@ static void test_winevents(void)
CloseHandle
(
hevent
);
ok
(
!
IsWindow
(
hwnd2
),
"window should be destroyed on thread exit
\n
"
);
/****** end of MOUSE_LL hook test *************/
skip_mouse_ll_hook_test:
ok
(
DestroyWindow
(
hwnd
),
"failed to destroy window
\n
"
);
}
...
...
@@ -7183,18 +7189,22 @@ static void test_PeekMessage(void)
DWORD
tid
,
qstatus
;
UINT
qs_all_input
=
QS_ALLINPUT
;
UINT
qs_input
=
QS_INPUT
;
BOOL
ret
;
struct
peekmsg_info
info
;
info
.
hwnd
=
CreateWindowA
(
"TestWindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
assert
(
info
.
hwnd
);
ShowWindow
(
info
.
hwnd
,
SW_SHOW
);
UpdateWindow
(
info
.
hwnd
);
SetFocus
(
info
.
hwnd
);
info
.
hevent
[
EV_START_STOP
]
=
CreateEventA
(
NULL
,
0
,
0
,
NULL
);
info
.
hevent
[
EV_SENDMSG
]
=
CreateEventA
(
NULL
,
0
,
0
,
NULL
);
info
.
hevent
[
EV_ACK
]
=
CreateEventA
(
NULL
,
0
,
0
,
NULL
);
hthread
=
CreateThread
(
NULL
,
0
,
send_msg_thread_2
,
&
info
,
0
,
&
tid
);
Sleep
(
100
);
trace
(
"signalling to start looping
\n
"
);
SetEvent
(
info
.
hevent
[
EV_START_STOP
]);
...
...
@@ -7379,6 +7389,52 @@ todo_wine {
ok
(
qstatus
==
0
,
"wrong qstatus %08lx
\n
"
,
qstatus
);
/* test whether presence of the quit flag in the queue affects
* the queue state
*/
PostQuitMessage
(
0x1234abcd
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_POSTMESSAGE
,
QS_POSTMESSAGE
),
"wrong qstatus %08lx
\n
"
,
qstatus
);
PostMessageA
(
info
.
hwnd
,
WM_USER
,
0
,
0
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
QS_POSTMESSAGE
,
QS_POSTMESSAGE
),
"wrong qstatus %08lx
\n
"
,
qstatus
);
msg
.
message
=
0
;
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
ok
(
ret
&&
msg
.
message
==
WM_USER
,
"got %d and %x instead of TRUE and WM_USER
\n
"
,
ret
,
msg
.
message
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
MAKELONG
(
0
,
QS_POSTMESSAGE
),
"wrong qstatus %08lx
\n
"
,
qstatus
);
msg
.
message
=
0
;
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
ok
(
ret
&&
msg
.
message
==
WM_QUIT
,
"got %d and %x instead of TRUE and WM_QUIT
\n
"
,
ret
,
msg
.
message
);
ok
(
msg
.
wParam
==
0x1234abcd
,
"got wParam %x instead of 0x1234abcd
\n
"
,
msg
.
wParam
);
ok
(
msg
.
lParam
==
0
,
"got lParam %lx instead of 0
\n
"
,
msg
.
lParam
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
todo_wine
{
ok
(
qstatus
==
MAKELONG
(
0
,
QS_POSTMESSAGE
),
"wrong qstatus %08lx
\n
"
,
qstatus
);
}
ret
=
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
);
ok
(
!
ret
,
"PeekMessageA should have returned FALSE instead of msg %x
\n
"
,
msg
.
message
);
qstatus
=
GetQueueStatus
(
qs_all_input
);
ok
(
qstatus
==
0
,
"wrong qstatus %08lx
\n
"
,
qstatus
);
trace
(
"signalling to exit
\n
"
);
SetEvent
(
info
.
hevent
[
EV_START_STOP
]);
...
...
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