[1/3] comctl32/listview: Test for parent sequence when creating with LVS_OWNERDRAWFIXED

Nikolay Sivov bunglehead at gmail.com
Mon Jun 22 18:51:13 CDT 2009


Changelog:
    - Test for parent sequence when creating with LVS_OWNERDRAWFIXED

>From 918d40c212e6e01e9ea917dfa36d6e92a1c6d3f1 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Mon, 22 Jun 2009 21:39:46 +0400
Subject: Test for parent sequence when creating with LVS_OWNERDRAWFIXED

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

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 2d697bb..820acc6 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -114,6 +114,14 @@ static const struct message create_parent_wnd_seq[] = {
     { 0 }
 };
 
+static const struct message create_ownerdrawfixed_parent_seq[] = {
+    { WM_NOTIFYFORMAT, sent },
+    { WM_QUERYUISTATE, sent|optional }, /* Win2K and higher */
+    { WM_MEASUREITEM, sent },
+    { WM_PARENTNOTIFY, sent },
+    { 0 }
+};
+
 static const struct message redraw_listview_seq[] = {
     { WM_PAINT,      sent|id,            0, 0, LISTVIEW_ID },
     { WM_PAINT,      sent|id,            0, 0, HEADER_ID },
@@ -1392,6 +1400,13 @@ static void test_create(void)
     ok(NULL == GetDlgItem(hList, 0), "NULL dialog item expected\n");
 
     DestroyWindow(hList);
+
+    /* WM_MEASUREITEM should be sent when created with LVS_OWNERDRAWFIXED */
+    flush_sequences(sequences, NUM_MSG_SEQUENCES);
+    hList = create_listview_control(LVS_OWNERDRAWFIXED);
+    ok_sequence(sequences, PARENT_SEQ_INDEX, create_ownerdrawfixed_parent_seq,
+                "created with LVS_OWNERDRAWFIXED - parent seq", TRUE);
+    DestroyWindow(hList);
 }
 
 static void test_redraw(void)
-- 
1.5.6.5







More information about the wine-patches mailing list