Module: wine Branch: master Commit: 825d2337b51420c3d5afdb96a349440399bcbd48 URL: http://source.winehq.org/git/wine.git/?a=commit;h=825d2337b51420c3d5afdb96a3...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Mon Nov 13 18:12:48 2017 +0800
user32/tests: Fix test failures under Windows.
Without SetForegroundWindow() these tests fail in some testbot runs.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/win.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index eace140..992fbf4 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2909,6 +2909,13 @@ static void test_popup_zorder(HWND hwnd_D, HWND hwnd_E, DWORD style) { HWND hwnd_A, hwnd_B, hwnd_C, hwnd_F;
+ /* Give current thread foreground state otherwise the tests may fail. */ + if (!SetForegroundWindow(hwnd_D)) + { + skip("SetForegroundWindow not working\n"); + return; + } + trace("hwnd_D %p, hwnd_E %p\n", hwnd_D, hwnd_E);
SetWindowPos(hwnd_E, hwnd_D, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);