Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/tests/progress.c:
+ todo_wine ok(state == PBST_PAUSED, "Expected %d (PBST_PAUSED), but got %d\n", PBST_PAUSED, state); + state = SendMessageA(progress_bar, PBM_GETSTATE, 0, 0); + todo_wine ok(state == PBST_ERROR, "Expected %d (PBST_ERROR), but got %d\n", PBST_ERROR, state); + + /* Check bad state */ + state = SendMessageA(progress_bar, PBM_SETSTATE, 0, 0); + todo_wine ok(state == 0, "Expected 0, but got %d\n", state); + state = SendMessageA(progress_bar, PBM_GETSTATE, 0, 0); + todo_wine ok(state == PBST_ERROR, "Expected %d (PBST_ERROR), but got %d\n", PBST_ERROR, state); + + /* Check setting current state */ + state = SendMessageA(progress_bar, PBM_SETSTATE, PBST_ERROR, 0); + todo_wine ok(state == PBST_ERROR, "Expected %d (PBST_ERROR), but got %d\n", PBST_ERROR, state); + state = SendMessageA(progress_bar, PBM_GETSTATE, 0, 0); + todo_wine ok(state == PBST_ERROR, "Expected %d (PBST_ERROR), but got %d\n", PBST_ERROR, state); + Let's add tests to check that a redraw is issued when the state changes. See c8ec431fd4cd370daba96aa18d892fa8d7397ef8 for an example of adding tests to verify if a message triggers WM_PAINT and WM_ERASEBKGND messages.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6186#note_77659