[1/2] user32/tests: add SendMessageCallback with NULL callback test
Fabian Bieler
der.fabe at gmx.net
Sat Feb 24 12:57:13 CST 2007
Windows silently ignores NULL pointers supplied to SendMessageCallback as
callback function.
This patch adds a disabled testcase for this behavior.
-------------- next part --------------
From 50a9a42131c985e2f0b379fa197b747a14aa027b Mon Sep 17 00:00:00 2001
From: Fabian Bieler <der.fabe at gmx.net>
Date: Sat, 24 Feb 2007 19:45:34 +0100
Subject: [PATCH] [1/2] user32/tests: add SendMessageCallback with NULL callback test
---
dlls/user32/tests/msg.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index f45a059..39bb94a 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -8889,6 +8889,30 @@ static void test_dialog_messages(void)
#undef check_selection
}
+static void test_nullCallback(void)
+{
+ HWND hwnd;
+ MSG msg;
+
+ if(0)
+ {
+ hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW,
+ 100, 100, 200, 200, 0, 0, 0, NULL);
+ ok (hwnd != 0, "Failed to create overlapped window\n");
+
+ ShowWindow(hwnd, SW_SHOW);
+ UpdateWindow( hwnd );
+
+ SendMessageCallbackA(hwnd,WM_NULL,0,0,NULL,0);
+
+ while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
+
+ ok(1, "\n");
+
+ DestroyWindow(hwnd);
+ }
+}
+
START_TEST(msg)
{
BOOL ret;
@@ -8959,6 +8983,7 @@ START_TEST(msg)
test_SetWindowRgn();
test_sys_menu();
test_dialog_messages();
+ test_nullCallback();
UnhookWindowsHookEx(hCBT_hook);
if (pUnhookWinEvent)
--
1.4.4.1
More information about the wine-patches
mailing list