diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index 5a3ffbe..7c55692 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -385,6 +385,34 @@ static void test_ITextDocument_Open(void) VariantClear(&testfile); } +void test_COM(void) +{ + HRESULT hres; + HWND w; + IRichEditOle *reOle = NULL; + ITextDocument *txtDoc = NULL; + IOleClientSite *clientSite = NULL; + /* ITextSelection *txtSel = NULL; */ + + w = new_richedit(NULL); + SendMessageA(w, EM_GETOLEINTERFACE, 0, (LPARAM)&reOle); + hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument, + (void **) &txtDoc); + ok(hres == S_OK, "IRichEditOle_QueryInterface\n"); + hres = IRichEditOle_GetClientSite(reOle, &clientSite); + ok(hres == S_OK, "IRichEditOle_GetClientSite\n"); + + /* hres = ITextDocument_GetSelection(txtDoc, &txtSel); */ + /* ok(hres == S_OK, "ITextDocument_GetSelection\n"); */ + /* while(ITextSelection_Release(txtSel)); */ + /* ITextDocument_Release(txtDoc); */ + /* IRichEditOle_Release(reOle); */ + + while(IOleClientSite_Release(clientSite)); + ITextDocument_Release(txtDoc); + IRichEditOle_Release(reOle); +} + START_TEST(richole) { /* Must explicitly LoadLibrary(). The test has no references to functions in @@ -394,4 +422,5 @@ START_TEST(richole) test_Interfaces(); test_ITextDocument_Open(); + test_COM(); }