[PATCH 3/5] user32/tests: Remove SetForegroundWindow success checks.
Rémi Bernon
wine at gitlab.winehq.org
Wed Jun 1 09:12:09 CDT 2022
From: Rémi Bernon <rbernon at codeweavers.com>
It's not supposed to fail and skipping the tests simply creates false
successful runs.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/user32/tests/win.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index c6667cafeff..e5b50b55482 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -3491,12 +3491,7 @@ 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;
- }
-
+ SetForegroundWindow(hwnd_D);
SetWindowPos(hwnd_E, hwnd_D, 0,0,0,0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
check_z_order(hwnd_D, hwnd_E, 0, 0, FALSE);
@@ -3954,12 +3949,7 @@ static void test_SetForegroundWindow(HWND hwnd)
ShowWindow(hwnd, SW_SHOW);
check_wnd_state(hwnd, hwnd, hwnd, 0);
- ret = SetForegroundWindow(hwnd);
- if (!ret)
- {
- skip( "SetForegroundWindow not working\n" );
- return;
- }
+ SetForegroundWindow(hwnd);
check_wnd_state(hwnd, hwnd, hwnd, 0);
SetLastError(0xdeadbeef);
@@ -11606,12 +11596,7 @@ static void test_topmost(void)
ok(owner != 0, "Failed to create owner window (%ld)\n", GetLastError());
/* Give current thread foreground state otherwise the tests may fail. */
- if (!SetForegroundWindow(owner))
- {
- DestroyWindow(owner);
- skip("SetForegroundWindow not working\n");
- return;
- }
+ SetForegroundWindow(owner);
hwnd = create_tool_window(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, owner);
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/169
More information about the wine-devel
mailing list