Nikolay Sivov : comctl32/header: Add XP SP3 workaround for Header tests. Fix window handle leak.

Alexandre Julliard julliard at winehq.org
Wed Sep 9 09:57:20 CDT 2009


Module: wine
Branch: master
Commit: fffb41f6a6ba50a2a2b80ef9bbdae2d0187a36d9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fffb41f6a6ba50a2a2b80ef9bbdae2d0187a36d9

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Tue Sep  8 20:23:54 2009 +0400

comctl32/header: Add XP SP3 workaround for Header tests. Fix window handle leak.

---

 dlls/comctl32/tests/header.c   |   17 +++++++++++++++++
 dlls/comctl32/tests/listview.c |    1 +
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c
index d0f3f28..3bbaaa8 100644
--- a/dlls/comctl32/tests/header.c
+++ b/dlls/comctl32/tests/header.c
@@ -1701,6 +1701,7 @@ START_TEST(header)
 {
     HWND parent_hwnd;
     ULONG_PTR ctx_cookie;
+    HWND hwnd;
 
     if (!init())
         return;
@@ -1732,6 +1733,22 @@ START_TEST(header)
         return;
     }
 
+    /* this is a XP SP3 failure workaround */
+    hwnd = CreateWindowExA(0, WC_HEADER, NULL,
+                           WS_CHILD|WS_BORDER|WS_VISIBLE|HDS_BUTTONS|HDS_HORZ,
+                           0, 0, 100, 100,
+                           parent_hwnd, NULL, GetModuleHandleA(NULL), NULL);
+
+    if (!IsWindow(hwnd))
+    {
+        win_skip("FIXME: failed to create Header window.\n");
+        unload_v6_module(ctx_cookie);
+        DestroyWindow(parent_hwnd);
+        return;
+    }
+    else
+        DestroyWindow(hwnd);
+
     /* comctl32 version 6 tests start here */
     test_hdf_fixedwidth(parent_hwnd);
     test_hds_nosizing(parent_hwnd);
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 5b39176..d0f2273 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -4071,6 +4071,7 @@ START_TEST(listview)
     {
         win_skip("FIXME: failed to create ListView window.\n");
         unload_v6_module(ctx_cookie);
+        DestroyWindow(hwndparent);
         return;
     }
     else




More information about the wine-cvs mailing list