[PATCH] comctl32/tests: Fixed tests for listview control default column width.

Austin Lund austin.lund at gmail.com
Tue Oct 26 23:38:42 CDT 2010


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

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index d249af8..c42e568 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -3286,6 +3286,7 @@ static void test_getitemrect(void)
     INT order[2];
     POINT pt;
     HDC hdc;
+    int defwidth;
 
     /* rectangle isn't empty for empty text items */
     hwnd = create_listview_control(LVS_LIST);
@@ -3300,7 +3301,11 @@ static void test_getitemrect(void)
     expect(0, rect.left);
     expect(0, rect.top);
     hdc = GetDC(hwnd);
-    todo_wine expect(GetDeviceCaps(hdc, LOGPIXELSX), rect.right);
+    if (GetDeviceCaps(hdc, LOGPIXELSX) == 120) 
+        defwidth = 128;
+    else
+        defwidth = 96;
+    todo_wine expect(defwidth, rect.right);
     ReleaseDC(hwnd, hdc);
     DestroyWindow(hwnd);
 
@@ -4130,6 +4135,7 @@ static void test_getcolumnwidth(void)
     LVCOLUMNA col;
     LVITEMA itema;
     HDC hdc;
+    int defwidth;
 
     /* default column width */
     hwnd = create_listview_control(LVS_ICON);
@@ -4154,7 +4160,11 @@ static void test_getcolumnwidth(void)
     SendMessage(hwnd, LVM_INSERTITEMA, 0, (LPARAM)&itema);
     ret = SendMessage(hwnd, LVM_GETCOLUMNWIDTH, 0, 0);
     hdc = GetDC(hwnd);
-    todo_wine expect(GetDeviceCaps(hdc, LOGPIXELSX), ret);
+    if (GetDeviceCaps(hdc, LOGPIXELSX) == 120) 
+        defwidth = 128;
+    else
+        defwidth = 96;
+    todo_wine expect(defwidth, ret);
     ReleaseDC(hwnd, hdc);
     DestroyWindow(hwnd);
 }
-- 
1.7.1




More information about the wine-patches mailing list