From 8db8636c0234490d6f1ad8dbeca1191f2e5df6a2 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 2 May 2008 18:06:07 -0700 Subject: [PATCH 1/2] user32: add a message test for changing the z-order. --- dlls/user32/tests/msg.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 6d1acb1..2c44d49 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -4035,6 +4035,23 @@ static const struct message WmInitEndSession_5[] = { { 0 } }; +static const struct message WmZOrder[] = { + { WM_WINDOWPOSCHANGING, sent|wparam, 0, 0 }, + { WM_GETMINMAXINFO, sent|defwinproc|wparam, 0, 0 }, + { HCBT_ACTIVATE, hook }, + { WM_WINDOWPOSCHANGING, sent|wparam, 3, 0 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOREDRAW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0 }, + { WM_ACTIVATEAPP, sent|wparam, 1, 0 }, + { WM_NCACTIVATE, sent|wparam|lparam, 1, 0 }, + { WM_ACTIVATE, sent|wparam|lparam, 1, 0 }, + { HCBT_SETFOCUS, hook }, + { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, + { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, + { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, + { 0 } +}; + static void test_MsgWaitForMultipleObjects(HWND hwnd) { DWORD ret; @@ -4496,6 +4513,18 @@ static void test_messages(void) DestroyWindow(hwnd); flush_sequence(); + + hwnd = CreateWindowExA(0, "TestWindowClass", NULL, 0, + 0, 0, 100, 100, 0, + NULL, NULL, 0); + flush_events(); + flush_sequence(); + res = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 100, 100, 0); + ok_sequence(WmZOrder, "Z-Order", TRUE); + ok(res == TRUE, "SetWindowPos expected TRUE, got %ld\n", res); + + DestroyWindow(hwnd); + flush_sequence(); } static void invisible_parent_tests(void) -- 1.5.3.6