From 5f7094ffd42568407bdb47f1631919158bbfc2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 15 Jan 2024 10:42:51 +0100 Subject: [PATCH] imm32/tests: Add todo_himc to some ImmTranslateMessage expected calls. Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=55491 --- dlls/imm32/tests/imm32.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 66ebbfd161d..488afbd34a9 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -385,6 +385,7 @@ struct ime_call BOOL broken; BOOL flaky_himc; BOOL todo_value; + BOOL todo_himc; }; struct ime_call empty_sequence[] = {{0}}; @@ -399,7 +400,13 @@ static int ok_call_( const char *file, int line, const struct ime_call *expected if ((ret = expected->func - received->func)) goto done; /* Wine doesn't allocate HIMC in a deterministic order, ignore them when they are enumerated */ if (expected->flaky_himc && (ret = !!(UINT_PTR)expected->himc - !!(UINT_PTR)received->himc)) goto done; - if (!expected->flaky_himc && (ret = (UINT_PTR)expected->himc - (UINT_PTR)received->himc)) goto done; + if (!expected->flaky_himc && (ret = (UINT_PTR)expected->himc - (UINT_PTR)received->himc)) + { + /* on some Wine configurations the IME UI doesn't get an HIMC */ + if (!winetest_platform_is_wine || !expected->todo_himc) goto done; + else todo_wine ok( 0, "got himc %p\n", received->himc ); + } + if ((ret = (UINT)(UINT_PTR)expected->hkl - (UINT)(UINT_PTR)received->hkl)) goto done; switch (expected->func) { @@ -7081,17 +7088,25 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first ) struct ime_call post_messages[] = { {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_TEST_WIN, .message = {.msg = WM_IME_STARTCOMPOSITION, .wparam = 1}}, - {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_STARTCOMPOSITION, .wparam = 1}}, + {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_STARTCOMPOSITION, .wparam = 1}, + .todo_himc = TRUE /* on some Wine configurations the IME UI doesn't get an HIMC */ + }, {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_TEST_WIN, .message = {.msg = WM_IME_ENDCOMPOSITION, .wparam = 1}}, - {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_ENDCOMPOSITION, .wparam = 1}}, + {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_ENDCOMPOSITION, .wparam = 1}, + .todo_himc = TRUE /* on some Wine configurations the IME UI doesn't get an HIMC */ + }, {0}, }; struct ime_call sent_messages[] = { {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_TEST_WIN, .message = {.msg = WM_IME_STARTCOMPOSITION, .wparam = 2}}, - {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_STARTCOMPOSITION, .wparam = 2}}, + {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_STARTCOMPOSITION, .wparam = 2}, + .todo_himc = TRUE /* on some Wine configurations the IME UI doesn't get an HIMC */ + }, {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_TEST_WIN, .message = {.msg = WM_IME_ENDCOMPOSITION, .wparam = 2}}, - {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_ENDCOMPOSITION, .wparam = 2}}, + {.hkl = expect_ime, .himc = 0/*himc*/, .func = MSG_IME_UI, .message = {.msg = WM_IME_ENDCOMPOSITION, .wparam = 2}, + .todo_himc = TRUE /* on some Wine configurations the IME UI doesn't get an HIMC */ + }, {0}, }; HWND hwnd, other_hwnd;