Still fails spuriously from time to time as the IME sometimes doesn't kick in, but hopefully less often.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/imm32/tests/imm32.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index fe7d966ea09..5cf7b357417 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -557,6 +557,7 @@ static void ok_seq_( const char *file, int line, const struct ime_call *expected }
static BOOL check_WM_SHOWWINDOW; +static BOOL ignore_IME_NOTIFY; static BOOL ignore_WM_IME_NOTIFY; static BOOL ignore_WM_IME_REQUEST;
@@ -3581,7 +3582,7 @@ static BOOL WINAPI ime_NotifyIME( HIMC himc, DWORD action, DWORD index, DWORD va .func = IME_NOTIFY, .notify = {.action = action, .index = index, .value = value} }; ime_trace( "himc %p, action %#lx, index %lu, value %lu\n", himc, action, index, value ); - ime_calls[ime_call_count++] = call; + if (!ignore_IME_NOTIFY) ime_calls[ime_call_count++] = call; return FALSE; }
@@ -7237,6 +7238,7 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first )
ignore_WM_IME_NOTIFY = TRUE; + ignore_IME_NOTIFY = TRUE;
keybd_event( 'Q', 0x10, 0, 0 ); flush_events(); @@ -7249,6 +7251,7 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first ) ok_seq( key_up_seq );
ignore_WM_IME_NOTIFY = FALSE; + ignore_IME_NOTIFY = FALSE;
ok_ret( 1, ImmUnlockIMC( himc ) ); @@ -7606,6 +7609,7 @@ static void test_ga_na_da(void)
ignore_WM_IME_NOTIFY = TRUE; + ignore_IME_NOTIFY = TRUE;
/* cancelling clears the composition string */
@@ -7680,6 +7684,7 @@ static void test_ga_na_da(void) todo_wine ok_seq( closed_seq );
ignore_WM_IME_NOTIFY = FALSE; + ignore_IME_NOTIFY = FALSE;
@@ -7849,6 +7854,7 @@ static void test_nihongo_no(void) for (i = 0; i < ARRAY_SIZE(closed_seq); i++) closed_seq[i].himc = himc; ignore_WM_IME_REQUEST = TRUE; ignore_WM_IME_NOTIFY = TRUE; + ignore_IME_NOTIFY = TRUE;
keybd_event( 'N', 0x31, 0, 0 ); @@ -7900,6 +7906,7 @@ static void test_nihongo_no(void)
ignore_WM_IME_REQUEST = FALSE; ignore_WM_IME_NOTIFY = FALSE; + ignore_IME_NOTIFY = FALSE;
/* Japanese IME doesn't take input from ImmProcessKey */
@@ -7916,6 +7923,7 @@ static void test_nihongo_no(void)
ignore_WM_IME_REQUEST = TRUE; ignore_WM_IME_NOTIFY = TRUE; + ignore_IME_NOTIFY = TRUE;
/* cancelling clears the composition string */ @@ -7992,6 +8000,7 @@ static void test_nihongo_no(void)
ignore_WM_IME_REQUEST = FALSE; ignore_WM_IME_NOTIFY = FALSE; + ignore_IME_NOTIFY = FALSE;
ok_ret( 1, ImmSetConversionStatus( himc, 0, IME_SMODE_PHRASEPREDICT ) );
From: Rémi Bernon rbernon@codeweavers.com
Still fails spuriously from time to time as the IME sometimes doesn't kick in, but hopefully less often. --- dlls/imm32/tests/imm32.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 5cf7b357417..7131bc2f6a5 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -7092,11 +7092,11 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first ) { { .hkl = expect_ime, .himc = 0/*himc*/, .func = IME_PROCESS_KEY, - .process_key = {.vkey = 'Q', .lparam = MAKELONG(1, 0x10)}, + .process_key = {.vkey = VK_RETURN, .lparam = MAKELONG(1, 0x1c)}, }, { .hkl = expect_ime, .himc = 0/*himc*/, .func = IME_TO_ASCII_EX, - .to_ascii_ex = {.vkey = kbd_char_first ? MAKELONG('Q', 'q') : 'Q', .vsc = 0x10}, + .to_ascii_ex = {.vkey = kbd_char_first ? MAKELONG(VK_RETURN, VK_RETURN) : VK_RETURN, .vsc = 0x1c}, }, {0}, }; @@ -7104,11 +7104,11 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first ) { { .hkl = expect_ime, .himc = 0/*himc*/, .func = IME_PROCESS_KEY, - .process_key = {.vkey = 'Q', .lparam = MAKELONG(1, 0xc010)}, + .process_key = {.vkey = VK_RETURN, .lparam = MAKELONG(1, 0xc01c)}, }, { .hkl = expect_ime, .himc = 0/*himc*/, .func = IME_TO_ASCII_EX, - .to_ascii_ex = {.vkey = 'Q', .vsc = 0xc010}, + .to_ascii_ex = {.vkey = VK_RETURN, .vsc = 0xc01c}, }, {0}, }; @@ -7240,12 +7240,12 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first ) ignore_WM_IME_NOTIFY = TRUE; ignore_IME_NOTIFY = TRUE;
- keybd_event( 'Q', 0x10, 0, 0 ); + keybd_event( VK_RETURN, 0x1c, 0, 0 ); flush_events(); process_messages_( hwnd ); ok_seq( key_down_seq );
- keybd_event( 'Q', 0x10, KEYEVENTF_KEYUP, 0 ); + keybd_event( VK_RETURN, 0x1c, KEYEVENTF_KEYUP, 0 ); flush_events(); process_messages_( hwnd ); ok_seq( key_up_seq ); @@ -7500,6 +7500,9 @@ static void test_ga_na_da(void) ok( !!hwnd, "CreateWindowW failed, error %lu\n", GetLastError() ); flush_events();
+ ignore_WM_IME_NOTIFY = TRUE; + ignore_IME_NOTIFY = TRUE; + himc = ImmCreateContext(); ok_ne( NULL, himc, HIMC, "%p" ); ctx = ImmLockIMC( himc ); @@ -7508,6 +7511,15 @@ static void test_ga_na_da(void) ok_ret( 1, ImmSetOpenStatus( himc, TRUE ) ); ok_ret( 1, ImmSetConversionStatus( himc, IME_CMODE_FULLSHAPE | IME_CMODE_NATIVE, IME_SMODE_PHRASEPREDICT ) ); flush_events(); + + keybd_event( 'R', 0x13, 0, 0 ); + flush_events(); + keybd_event( 'R', 0x13, KEYEVENTF_KEYUP, 0 ); + + keybd_event( VK_RETURN, 0x1c, 0, 0 ); + flush_events(); + keybd_event( VK_RETURN, 0x1c, KEYEVENTF_KEYUP, 0 ); + flush_events(); memset( ime_calls, 0, sizeof(ime_calls) ); ime_call_count = 0;
@@ -7608,9 +7620,6 @@ static void test_ga_na_da(void) todo_wine ok_seq( partial_return_seq );
- ignore_WM_IME_NOTIFY = TRUE; - ignore_IME_NOTIFY = TRUE; - /* cancelling clears the composition string */
keybd_event( 'R', 0x13, 0, 0 ); @@ -8033,6 +8042,12 @@ START_TEST(imm32)
test_ImmEnumInputContext();
+ /* run these before installing the custom IME, sometimes it takes a moment + * to uninstall and the default IME doesn't activate immediately + */ + test_ga_na_da(); + test_nihongo_no(); + test_ImmInstallIME(); wineime_hkl = ime_install();
@@ -8084,9 +8099,6 @@ START_TEST(imm32)
if (wineime_hkl) ime_cleanup( wineime_hkl, TRUE );
- test_ga_na_da(); - test_nihongo_no(); - if (init()) { test_ImmNotifyIME();
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=142626
Your paranoid android.
=== w11pro64 (32 bit report) ===
imm32: imm32.c:7246: Test failed: kbd_char_first: 0 (missing): hkl E020047F, himc 000B02A7, IME_PROCESS_KEY vkey 0xd, lparam 0x1c0001 imm32.c:7246: Test failed: kbd_char_first: 1 (missing): hkl E020047F, himc 000B02A7, IME_TO_ASCII_EX vkey 0xd000d, vsc 0x1c, flags 0 imm32.c:7251: Test failed: kbd_char_first: 0 (missing): hkl E020047F, himc 000B02A7, IME_PROCESS_KEY vkey 0xd, lparam 0xc01c0001 imm32.c:7251: Test failed: kbd_char_first: 1 (missing): hkl E020047F, himc 000B02A7, IME_TO_ASCII_EX vkey 0xd, vsc 0xc01c, flags 0