From d31e8a311871ba98f22b2a33b2fb7bdbba9cc2eb Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 21 Apr 2015 16:01:30 +0800 Subject: [PATCH] user32/tests: Add PeekMessage(PM_NOREMOVE) call to inter-thread messages test. --- dlls/user32/tests/msg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index b014dd9a0f7..4794b12a748 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -14609,6 +14609,9 @@ static const struct message send_message_2[] = { }; static const struct message send_message_3[] = { { WM_USER+3, sent|wparam|lparam, 0, 0 }, + { 0 } +}; +static const struct message send_message_4[] = { { WM_USER+1, sent|wparam|lparam, 0, 0 }, { 0 } }; @@ -14715,11 +14718,16 @@ todo_wine ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE); ok(ret == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE|QS_POSTMESSAGE), "wrong status %08x\n", ret); + trace("main: call PeekMessage\n"); + ok(PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE), "PeekMessage should not fail\n"); + ok(msg.message == WM_USER+1, "expected WM_USER+1, got %04x\n", msg.message); + ok_sequence(send_message_3, "SendMessage from other thread 3", thread_n == 2); + trace("main: call PeekMessage\n"); ok(PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should not fail\n"); ok(msg.message == WM_USER+1, "expected WM_USER+1, got %04x\n", msg.message); DispatchMessageA(&msg); - ok_sequence(send_message_3, "SendMessage from other thread 3", thread_n == 2); + ok_sequence(send_message_4, "SendMessage from other thread 4", FALSE); /* intentionally yield */ MsgWaitForMultipleObjects(0, NULL, FALSE, 100, qs_all_input); @@ -14733,7 +14741,7 @@ else trace("main: call PeekMessage\n"); ok(!PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should fail\n"); - ok_sequence(WmEmptySeq, "SendMessage from other thread 4", thread_n == 2); + ok_sequence(WmEmptySeq, "SendMessage from other thread 5", thread_n == 2); ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE); ok(ret == 0, "wrong status %08x\n", ret);