Commit a307c6fd authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf/tests: Verify to make sure OnPopContext happens before context is removed from stack.

parent e73b17d0
...@@ -461,6 +461,20 @@ ITfContext *pic) ...@@ -461,6 +461,20 @@ ITfContext *pic)
static HRESULT WINAPI ThreadMgrEventSink_OnPopContext(ITfThreadMgrEventSink *iface, static HRESULT WINAPI ThreadMgrEventSink_OnPopContext(ITfThreadMgrEventSink *iface,
ITfContext *pic) 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"); ok(test_OnPopContext == SINK_EXPECTED, "Unexpected OnPopContext sink\n");
test_OnPopContext = SINK_FIRED; test_OnPopContext = SINK_FIRED;
return S_OK; return S_OK;
......
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