Module: wine Branch: master Commit: 91b09e0c5bbd17f0633331e40be4f83b47cfc982 URL: http://source.winehq.org/git/wine.git/?a=commit;h=91b09e0c5bbd17f0633331e40b...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Mon Nov 13 18:13:46 2017 +0800
user32/tests: Separate WS_EX_TOPMOST tests from SetWindowPos ones.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/win.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 992fbf4..fdfdf92 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2573,17 +2573,6 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) orig_win_rc.right, orig_win_rc.bottom, 0); ok(ret, "Got %d\n", ret);
- ok(!(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n"); - ret = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ok(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n"); - ret = SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ok(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n"); - ret = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); - ok(ret, "Got %d\n", ret); - ok(!(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n"); - hwnd_desktop = GetDesktopWindow(); ok(!!hwnd_desktop, "Failed to get hwnd_desktop window (%d).\n", GetLastError()); hwnd_child = create_tool_window(WS_VISIBLE|WS_CHILD, hwnd); @@ -9867,6 +9856,22 @@ static void test_desktop( void ) } }
+static void test_topmost(HWND hwnd) +{ + BOOL ret; + + ok(!(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n"); + ret = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); + ok(ret, "Got %d\n", ret); + ok(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n"); + ret = SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); + ok(ret, "Got %d\n", ret); + ok(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST, "WS_EX_TOPMOST should be set\n"); + ret = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE); + ok(ret, "Got %d\n", ret); + ok(!(GetWindowLongA(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST), "WS_EX_TOPMOST should not be set\n"); +} + START_TEST(win) { char **argv; @@ -9944,6 +9949,7 @@ START_TEST(win) our_pid = GetWindowThreadProcessId(hwndMain, NULL);
/* Add the tests below this line */ + test_topmost(hwndMain); test_child_window_from_point(); test_window_from_point(argv[0]); test_thick_child_size(hwndMain);