[1/2] msctf/tests: Always set focus again explicitly for Win7+
André Hentschel
nerv at dawncrow.de
Wed Nov 6 14:28:51 CST 2013
---
dlls/msctf/tests/inputprocessor.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index eb293bc..d5df2dd 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -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");
--
1.8.1.2
More information about the wine-patches
mailing list