Module: wine
Branch: master
Commit: 0741d193ffef9e05668dd4a3eedcf55f063b7c5f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0741d193ffef9e05668dd4a3…
Author: Zebediah Figura <z.figura12(a)gmail.com>
Date: Thu Feb 1 18:36:54 2018 -0600
user32/tests: Flush events after test_ShowWindow().
The test minimizes windows, which triggers most window managers to generate
focus events on other windows. These events aren't processed until halfway
through the next test, test_EnableWindow(), when a message loop is run, and
as a result an unexpected window (usually hwndMain) is activated, causing the
test to fail.
The testbot uses focus-follows-mouse mode, so these focus events were not
triggered, thereby causing a success inside the todo block.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/user32/tests/win.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index f492ecc..9cf4ed3 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6780,6 +6780,8 @@ static void test_ShowWindow(void)
ok(EqualRect(&rcEmpty, &rc), "expected %s, got %s\n",
wine_dbgstr_rect(&rcEmpty), wine_dbgstr_rect(&rc));
DestroyWindow(hwnd);
+
+ flush_events(TRUE);
}
static DWORD CALLBACK enablewindow_thread(LPVOID arg)
@@ -6834,8 +6836,7 @@ static void test_EnableWindow(void)
}
ok(!IsWindowEnabled(hwnd), "window should not be enabled\n");
- todo_wine
- check_active_state(hwnd, hwnd, hwnd);
+ check_active_state(hwnd, hwnd, hwnd);
ok(0 == GetCapture(), "GetCapture() = %p\n", GetCapture());
CloseHandle(hthread);