From ccd4479ce98f44161f3ccaef278577068376bfd2 Mon Sep 17 00:00:00 2001 From: Austin Lund Date: Tue, 26 Oct 2010 14:45:12 +1000 Subject: [PATCH] user32/tests: Fixed WM_SETFONT combo box tests. --- dlls/user32/tests/combo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/combo.c b/dlls/user32/tests/combo.c index f63b941e326..fd852d13df7 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 {