[2/3] comctl32: Additional test for ListView header creation

Nikolay Sivov bunglehead at gmail.com
Wed Apr 1 17:00:27 CDT 2009


Changelog:
    - Additional test for ListView header creation

>From a037738d4e6cfb62f3711434b83807613ac93a66 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed, 1 Apr 2009 17:44:24 -0400
Subject: Additional test for ListView header creation

---
 dlls/comctl32/tests/listview.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index f7b34af..0ffe5da 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -863,6 +863,18 @@ static void test_create(void)
     ok(IsWindow(hHeader), "Header should be created\n");
     ok(hHeader == GetDlgItem(hList, 0), "Expected header as dialog item\n");
     DestroyWindow(hList);
+
+    /* LVS_REPORT without WS_VISIBLE, try to show it */
+    hList = CreateWindow("SysListView32", "Test", LVS_REPORT, 0, 0, 100, 100, NULL, NULL,
+                          GetModuleHandle(NULL), 0);
+    hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0);
+    todo_wine ok(!IsWindow(hHeader), "Header shouldn't be created\n");
+    todo_wine ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n");
+    ShowWindow(hList, SW_SHOW);
+    hHeader = (HWND)SendMessage(hList, LVM_GETHEADER, 0, 0);
+    ok(IsWindow(hHeader), "Header shouldn't be created\n");
+    ok(hHeader == GetDlgItem(hList, 0), "NULL dialog item expected\n");
+    DestroyWindow(hList);
 }
 
 static void test_redraw(void)
-- 
1.5.6.5







More information about the wine-patches mailing list