Commit 2cd81c14 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

imm32/tests: Terminate the thread cleanly.

parent 1fb30e1c
...@@ -640,7 +640,10 @@ static void test_ImmThreads(void) ...@@ -640,7 +640,10 @@ static void test_ImmThreads(void)
ImmReleaseContext(hwnd,himc); ImmReleaseContext(hwnd,himc);
SendMessageA(threadinfo.hwnd, WM_CLOSE, 0, 0); SendMessageA(threadinfo.hwnd, WM_CLOSE, 0, 0);
TerminateThread(hThread, 1); rc = PostThreadMessageA(dwThreadId, WM_QUIT, 1, 0);
ok(rc == 1, "PostThreadMessage should succeed\n");
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
himc = ImmGetContext(GetDesktopWindow()); himc = ImmGetContext(GetDesktopWindow());
ok(himc == NULL, "Should not be able to get himc from other process window\n"); ok(himc == NULL, "Should not be able to get himc from other process window\n");
...@@ -842,6 +845,7 @@ static void test_ImmDefaultHwnd(void) ...@@ -842,6 +845,7 @@ static void test_ImmDefaultHwnd(void)
WaitForSingleObject(thread, INFINITE); WaitForSingleObject(thread, INFINITE);
ok(thread_ime_wnd != def1, "thread_ime_wnd == def1\n"); ok(thread_ime_wnd != def1, "thread_ime_wnd == def1\n");
ok(!IsWindow(thread_ime_wnd), "thread_ime_wnd was not destroyed\n"); ok(!IsWindow(thread_ime_wnd), "thread_ime_wnd was not destroyed\n");
CloseHandle(thread);
ImmReleaseContext(hwnd, imc1); ImmReleaseContext(hwnd, imc1);
ImmReleaseContext(hwnd, imc3); ImmReleaseContext(hwnd, imc3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment