user32/tests: add test for WM_SETICON

Kirill K. Smirnov lich at star.math.spbu.ru
Mon Jan 15 12:47:44 CST 2007


-------------- next part --------------
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 7e63e73..0727d1f 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -3600,6 +3600,11 @@ static void test_sys_menu(void)
     DestroyWindow(hwnd);
 }
 
+static const struct message WmSetIcon[] = {
+    { WM_SETICON, sent},
+    { 0 }
+};
+
 /* test if we receive the right sequence of messages */
 static void test_messages(void)
 {
@@ -3926,6 +3931,27 @@ static void test_messages(void)
     DestroyWindow(hchild);
     DestroyWindow(hparent);
     flush_sequence();
+
+    /* Message sequences for WM_SETICON */
+    hwnd = CreateWindowExA(0, "TestWindowClass", NULL,
+                           WS_OVERLAPPEDWINDOW,
+                           CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0,
+                           NULL, NULL, 0);
+    flush_sequence();
+    SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(0, IDI_APPLICATION));
+    ok_sequence(WmSetIcon, "WM_SETICON for window with caption", FALSE);
+    DestroyWindow(hwnd);
+    flush_sequence();
+
+    hwnd = CreateWindowExA(0, "TestWindowClass", NULL,
+                           WS_POPUP,
+                           CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0,
+                           NULL, NULL, 0);
+    flush_sequence();
+    SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(0, IDI_APPLICATION));
+    ok_sequence(WmSetIcon, "WM_SETICON for window without caption", FALSE);
+    DestroyWindow(hwnd);
+    flush_sequence();
 }
 
 static void invisible_parent_tests(void)


More information about the wine-patches mailing list