msctf/tests: Verify to make sure OnPopContext happens before context is removed from stack.
This commit is contained in:
parent
e73b17d018
commit
a307c6fdc2
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue