[PATCH] user32/tests: Fixed WM_SETFONT combo box tests.

Austin Lund austin.lund at gmail.com
Mon Oct 25 23:45:12 CDT 2010


---
 dlls/user32/tests/combo.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c
index f63b941..fd852d1 100644
--- a/dlls/user32/tests/combo.c
+++ b/dlls/user32/tests/combo.c
@@ -117,6 +117,10 @@ static void test_setfont(DWORD style)
     MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2);
     todo_wine expect_rect(r, 5, 5, 105, 105);
 
+    /* The size of the dropped control is initially equal to the size
+       of the window when it was created.  The size of the calculated
+       dropped area changes only by how much the selection area
+       changes, not by how much the list area changes.  */
     if (font_height(hFont1) == 10 && font_height(hFont2) == 8)
     {
         SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE);
@@ -124,21 +128,21 @@ static void test_setfont(DWORD style)
         expect_rect(r, 0, 0, 100, 18);
         SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r);
         MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2);
-        todo_wine expect_rect(r, 5, 5, 105, 99);
+        todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont1)));
 
         SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont2, FALSE);
         GetClientRect(hCombo, &r);
         expect_rect(r, 0, 0, 100, 16);
         SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r);
         MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2);
-        todo_wine expect_rect(r, 5, 5, 105, 97);
+        todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont2)));
 
         SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE);
         GetClientRect(hCombo, &r);
         expect_rect(r, 0, 0, 100, 18);
         SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r);
         MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2);
-        todo_wine expect_rect(r, 5, 5, 105, 99);
+        todo_wine expect_rect(r, 5, 5, 105, 105 - (font_height(GetStockObject(SYSTEM_FONT)) - font_height(hFont1)));
     }
     else
     {
-- 
1.7.1




More information about the wine-patches mailing list