On Mon, 30 Mar 2020 at 11:48, Zhiyi Zhang zzhang@codeweavers.com wrote:
@@ -3200,6 +3200,7 @@ static void test_wndproc(void) flush_events(); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it, i=%u.\n", expect_messages->message, expect_messages->window, i);
expect_messages = NULL;
/* World of Warplanes hides the window by removing WS_VISIBLE and expects Reset() to show it again. */ device_style = GetWindowLongA(device_window, GWL_STYLE);
@@ -3219,6 +3220,7 @@ static void test_wndproc(void) flush_events(); ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n", expect_messages->message, expect_messages->window);
expect_messages = NULL;
ok(windowpos.hwnd == device_window && !windowpos.hwndInsertAfter && !windowpos.x && !windowpos.y && !windowpos.cx && !windowpos.cy
We should probably clear "expect_messages" before creating windows that use test_proc(), instead of relying on the preceding tests to clean things up properly. That's not to say we shouldn't clear "expect_messages" at the "done:" label in test_wndproc() like we do for "filter_messages" as well though. Also, mode_change_messages[] and mode_change_messages_hidden[] should be static const. (The reason they aren't already is probably "windowpos", but there is no particular reason that couldn't be static as well.)