From 70bcfdc67e38267973dec686c399651ef224c53f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 7 Jul 2008 16:47:21 -0700 Subject: [PATCH 1/2] user32: Add a test for changing the z-order. --- dlls/user32/tests/msg.c | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index dfb6108..071fd67 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1777,6 +1777,23 @@ static void ok_sequence_(const struct message *expected, const char *context, in flush_sequence(); } +static UINT sequence_contains(UINT msg) +{ + static const struct message end_of_sequence = { 0, 0, 0, 0 }; + const struct message *actual; + UINT num = 0; + + add_message(&end_of_sequence); + actual = sequence; + + while (actual->message) + { + if (actual->message == msg) num++; + actual++; + } + return num; +} + /******************************** MDI test **********************************/ /* CreateWindow for MDI frame window, initially visible */ @@ -4132,6 +4149,7 @@ static void test_messages(void) HMENU hmenu; MSG msg; LRESULT res; + UINT num; flush_sequence(); @@ -4542,6 +4560,20 @@ 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(res == TRUE, "SetWindowPos expected TRUE, got %ld\n", res); + num = sequence_contains(WM_SIZE); + todo_wine { + ok(num == 1, "expected 1 WM_SIZE in message sequence, got %d\n", num); + } + DestroyWindow(hwnd); + flush_sequence(); } static void invisible_parent_tests(void) -- 1.5.4.5