msctf/tests: Always set focus again explicitly for Win7+.

oldstable
André Hentschel 2013-11-06 21:28:51 +01:00 committed by Alexandre Julliard
parent 259cb3c8cd
commit e22908a867
1 changed files with 10 additions and 15 deletions

View File

@ -2075,20 +2075,15 @@ static void test_AssociateFocus(void)
processPendingMessages();
ITfThreadMgr_GetFocus(g_tm, &dmcheck);
if (dmcheck != NULL)
{
ok(dmcheck == dm1, "Expected DocumentMgr not focused\n");
ITfDocumentMgr_Release(dmcheck);
}
else
{
/* Sometimes we need to explicitly set focus on Win7 */
test_CurrentFocus = dm1;
test_PrevFocus = FOCUS_IGNORE;
test_OnSetFocus = SINK_EXPECTED;
ITfThreadMgr_SetFocus(g_tm, dm1);
sink_check_ok(&test_OnSetFocus,"OnSetFocus");
}
ok(dmcheck == dm1 || broken(dmcheck == dmorig /* Win7+ */), "Expected DocumentMgr not focused\n");
ITfDocumentMgr_Release(dmcheck);
/* We need to explicitly set focus on Win7+ */
test_CurrentFocus = dm1;
test_PrevFocus = FOCUS_IGNORE;
test_OnSetFocus = SINK_OPTIONAL; /* Doesn't always fire on Win7+ */
ITfThreadMgr_SetFocus(g_tm, dm1);
sink_check_ok(&test_OnSetFocus, "OnSetFocus");
hr = ITfThreadMgr_AssociateFocus(g_tm,wnd2,dm2,&olddm);
ok(SUCCEEDED(hr),"AssociateFocus failed\n");
@ -2133,7 +2128,7 @@ static void test_AssociateFocus(void)
test_CurrentFocus = dmorig;
test_PrevFocus = dm1;
test_OnSetFocus = SINK_EXPECTED;
test_OnSetFocus = SINK_OPTIONAL; /* Doesn't always fire on Win7+ */
test_ACP_GetStatus = SINK_IGNORE;
ITfThreadMgr_SetFocus(g_tm,dmorig);
sink_check_ok(&test_OnSetFocus,"OnSetFocus");