Aric Stewart : msctf/tests: Test ITfKeystrokeMgr::IsPreservedKey.

Alexandre Julliard julliard at winehq.org
Thu Apr 23 11:27:25 CDT 2009


Module: wine
Branch: master
Commit: 35127bc01f5839e3a3a1fc645baba732121e9c94
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=35127bc01f5839e3a3a1fc645baba732121e9c94

Author: Aric Stewart <aric at codeweavers.com>
Date:   Wed Apr 22 12:37:55 2009 -0500

msctf/tests: Test ITfKeystrokeMgr::IsPreservedKey.

---

 dlls/msctf/tests/inputprocessor.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index e5b2cd8..2b2adde 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -264,6 +264,7 @@ static void test_KeystrokeMgr(void)
     ITfKeystrokeMgr *keymgr= NULL;
     HRESULT hr;
     TF_PRESERVEDKEY tfpk;
+    BOOL preserved;
 
     hr = ITfThreadMgr_QueryInterface(g_tm, &IID_ITfKeystrokeMgr, (LPVOID*)&keymgr);
     ok(SUCCEEDED(hr),"Failed to get IID_ITfKeystrokeMgr for ThreadMgr\n");
@@ -280,9 +281,18 @@ static void test_KeystrokeMgr(void)
     hr =ITfKeystrokeMgr_PreserveKey(keymgr, tid, &CLSID_PreservedKey, &tfpk, NULL, 0);
     todo_wine ok(hr == TF_E_ALREADY_EXISTS,"ITfKeystrokeMgr_PreserveKey inproperly succeeded \n");
 
+    preserved = FALSE;
+    hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved);
+    todo_wine ok(hr == S_OK, "ITfKeystrokeMgr_IsPreservedKey failed\n");
+    if (hr == S_OK) todo_wine ok(preserved == TRUE,"misreporting preserved key\n");
+
     hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
     todo_wine ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnpreserveKey failed\n");
 
+    hr = ITfKeystrokeMgr_IsPreservedKey(keymgr, &CLSID_PreservedKey, &tfpk, &preserved);
+    todo_wine ok(hr == S_FALSE, "ITfKeystrokeMgr_IsPreservedKey failed\n");
+    if (hr == S_FALSE) todo_wine ok(preserved == FALSE,"misreporting preserved key\n");
+
     hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
     todo_wine ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
 




More information about the wine-cvs mailing list