Austin Lund : user32/tests: Fixed WM_SETFONT combo box tests.

Alexandre Julliard julliard at winehq.org
Tue Oct 26 12:34:46 CDT 2010


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

Author: Austin Lund <austin.lund at gmail.com>
Date:   Tue Oct 26 14:45:12 2010 +1000

user32/tests: Fixed WM_SETFONT combo box tests.

---

 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
     {




More information about the wine-cvs mailing list