Module: wine
Branch: master
Commit: 19c107335e9aa269bcbe282bee8b97575c7b0bb4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=19c107335e9aa269bcbe282b…
Author: Rémi Bernon <rbernon(a)codeweavers.com>
Date: Tue Nov 12 21:42:01 2019 +0100
user32/tests: Make the test_PeekMessage3 timer fire less often.
On Windows it sometimes fires again before we get the expected WM_USER
message and/or before the end of the test where we don't expect any more
message. We cannot fire it only once because Wine doesn't pass the tests
yet and it would block otherwise, but fire it less often helps the test
to pass on Windows.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/user32/tests/msg.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 2226f4ff08..ad4ff7d2a7 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -12420,7 +12420,7 @@ static void test_PeekMessage3(void)
/* GetMessage() and PeekMessage(..., PM_REMOVE) should prefer messages which
* were already seen. */
- SetTimer(hwnd, 1, 0, NULL);
+ SetTimer(hwnd, 1, 100, NULL);
while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE));
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
@@ -12436,7 +12436,7 @@ static void test_PeekMessage3(void)
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
- SetTimer(hwnd, 1, 0, NULL);
+ SetTimer(hwnd, 1, 100, NULL);
while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE));
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
@@ -12451,7 +12451,7 @@ static void test_PeekMessage3(void)
/* It doesn't matter if a message range is specified or not. */
- SetTimer(hwnd, 1, 0, NULL);
+ SetTimer(hwnd, 1, 100, NULL);
while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
@@ -12467,7 +12467,7 @@ static void test_PeekMessage3(void)
/* But not if the post messages were added before the PeekMessage() call. */
PostMessageA(hwnd, WM_USER, 0, 0);
- SetTimer(hwnd, 1, 0, NULL);
+ SetTimer(hwnd, 1, 100, NULL);
while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
@@ -12480,7 +12480,7 @@ static void test_PeekMessage3(void)
/* More complicated test with multiple messages. */
PostMessageA(hwnd, WM_USER, 0, 0);
- SetTimer(hwnd, 1, 0, NULL);
+ SetTimer(hwnd, 1, 100, NULL);
while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER + 1, 0, 0);