Aric Stewart : msctf/tests: Verify to make sure OnPopContext happens before context is removed from stack .
Alexandre Julliard
julliard at winehq.org
Wed Jun 24 09:22:55 CDT 2009
Module: wine
Branch: master
Commit: a307c6fdc294d5e7c8775e0cbd193443b1537c1d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a307c6fdc294d5e7c8775e0cbd193443b1537c1d
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed Jun 24 17:30:18 2009 +0900
msctf/tests: Verify to make sure OnPopContext happens before context is removed from stack.
---
dlls/msctf/tests/inputprocessor.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/msctf/tests/inputprocessor.c b/dlls/msctf/tests/inputprocessor.c
index b9f2469..4d94d3c 100644
--- a/dlls/msctf/tests/inputprocessor.c
+++ b/dlls/msctf/tests/inputprocessor.c
@@ -461,6 +461,20 @@ ITfContext *pic)
static HRESULT WINAPI ThreadMgrEventSink_OnPopContext(ITfThreadMgrEventSink *iface,
ITfContext *pic)
{
+ HRESULT hr;
+ ITfDocumentMgr *docmgr;
+ ITfContext *test;
+
+ hr = ITfContext_GetDocumentMgr(pic,&docmgr);
+ ok(SUCCEEDED(hr),"GetDocumenMgr failed\n");
+ ITfDocumentMgr_Release(docmgr);
+ test = (ITfContext*)0xdeadbeef;
+ hr = ITfDocumentMgr_GetTop(docmgr,&test);
+ ok(SUCCEEDED(hr),"GetTop failed\n");
+ ok(test == pic, "Wrong context is on top\n");
+ if (test)
+ ITfContext_Release(test);
+
ok(test_OnPopContext == SINK_EXPECTED, "Unexpected OnPopContext sink\n");
test_OnPopContext = SINK_FIRED;
return S_OK;
More information about the wine-cvs
mailing list