[v4 PATCH] user32/test: Color message isn't sent during startup for buttons
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Mon Feb 15 03:28:23 CST 2016
Moved test to msg.c
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/user32/tests/msg.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index d15a8e7..1a3ede8 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -15158,6 +15158,39 @@ static void init_funcs(void)
#undef X
}
+static BOOL color_message_called = FALSE;
+static INT_PTR CALLBACK test_dlg_settext_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
+{
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hok = GetDlgItem(hwnd, IDOK);
+
+ SendMessageA(hok, WM_SETTEXT, 0, (WPARAM)"Testing");
+ PostMessageA(hwnd, WM_USER, 0xdeadbeef, 2);
+ break;
+ }
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORSTATIC:
+ color_message_called = TRUE;
+ break;
+ case WM_USER:
+ EndDialog(hwnd, 0);
+ break;
+ }
+ return 1;
+}
+
+static void test_dlg_settext(void)
+{
+ int ret;
+
+ ret = DialogBoxParamA(GetModuleHandleA(NULL), "EDIT_READONLY_DIALOG", NULL, test_dlg_settext_proc, 0);
+ ok(ret == 0, "expected 0, got %d\n", ret);
+ todo_wine ok(!color_message_called, "Unexpected color message\n");
+}
+
START_TEST(msg)
{
char **test_argv;
@@ -15285,6 +15318,7 @@ START_TEST(msg)
test_TrackPopupMenu();
test_TrackPopupMenuEmpty();
test_DoubleSetCapture();
+ test_dlg_settext();
/* keep it the last test, under Windows it tends to break the tests
* which rely on active/foreground windows being correct.
*/
--
1.9.1
More information about the wine-patches
mailing list