I prepared fix https://gitlab.winehq.org/wine/wine/-/commit/b45ad56, that I didn't provide test for, but now I find a way to check it.
-- v8: comctl32/tests: Add rebar chevron visibility test.
From: Ilia Docin ilya.docin@contentai.ru
--- dlls/comctl32/tests/rebar.c | 49 +++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index 7cafa4ba52b..8530f8a1923 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -121,6 +121,7 @@ static HWND build_toolbar(int nr, HWND hParent) }
static int g_parent_measureitem; +static RECT g_chevron_rect;
static LRESULT CALLBACK parent_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { @@ -129,8 +130,17 @@ static LRESULT CALLBACK parent_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARA case WM_NOTIFY: { NMHDR *lpnm = (NMHDR *)lParam; - if (lpnm->code == RBN_HEIGHTCHANGE) - GetClientRect(lpnm->hwndFrom, &height_change_notify_rect); + switch (lpnm->code) + { + case RBN_HEIGHTCHANGE: + GetClientRect(lpnm->hwndFrom, &height_change_notify_rect); + break; + case RBN_CHEVRONPUSHED: + g_chevron_rect = ((NMREBARCHEVRON *)lParam)->rc; + break; + default: + break; + } } break; case WM_MEASUREITEM: @@ -1178,6 +1188,40 @@ static void init_functions(void) #undef X }
+static void test_chevron(void) +{ + HWND hRebar; + REBARBANDINFOA rbi; + /* the gap between the child and the next band */ + enum { REBAR_POST_CHILD = 4 }; + + hRebar = create_rebar_control(0); + rbi.cbSize = REBARBANDINFOA_V6_SIZE; + rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_SIZE | RBBIM_STYLE; + rbi.cxIdeal = 128; + rbi.cx = rbi.cxIdeal + REBAR_POST_CHILD - 1; + rbi.cxMinChild = 100; + rbi.cyMinChild = rbi.cxMinChild; + rbi.hwndChild = build_toolbar(1, hRebar); + rbi.fStyle = RBBS_USECHEVRON | RBBS_NOGRIPPER; + SendMessageA(hRebar, RB_INSERTBANDA, 0, (LPARAM)&rbi); + SendMessageA(hRebar, RB_INSERTBANDA, 1, (LPARAM)&rbi); + + SetRectEmpty(&g_chevron_rect); + SendMessageA(hRebar, RB_PUSHCHEVRON, 0, 0); + ok(!IsRectEmpty(&g_chevron_rect), "Unexpected empty chevron rect\n"); + + /* increase band width to make it more then ideal value to hide chevron */ + rbi.fMask = RBBIM_SIZE; + rbi.cx = rbi.cx + 1; + SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rbi); + + SendMessageA(hRebar, RB_PUSHCHEVRON, 0, 0); + ok(IsRectEmpty(&g_chevron_rect), "Unexpected non-empty chevron rect\n"); + + DestroyWindow(hRebar); +} + START_TEST(rebar) { MSG msg; @@ -1201,6 +1245,7 @@ START_TEST(rebar) test_layout(); test_resize(); test_style(); + test_chevron();
out: PostQuitMessage(0);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147708
Your paranoid android.
=== w10pro64_en_AE_u8 (32 bit report) ===
comctl32: rebar.c:958: Test failed: expected 35 for 38 from line 999 rebar.c:958: Test failed: expected 40 for 43 from line 1005 rebar.c:958: Test failed: expected 40 for 43 from line 1024