[PATCH] user32/tests: Flush events after test_ShowWindow().

Zebediah Figura z.figura12 at gmail.com
Thu Feb 1 18:36:54 CST 2018


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 at gmail.com>
---
 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 917ab61..7be83571 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -6779,6 +6779,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)
@@ -6833,8 +6835,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);
-- 
2.7.4




More information about the wine-devel mailing list