Andrey Turkin : ole32/tests: Add test for IContextCallback.
Alexandre Julliard
julliard at winehq.org
Wed Jan 14 09:03:40 CST 2009
Module: wine
Branch: master
Commit: 8ff76d24f6d2d74c135a2ca6d57838597c806046
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8ff76d24f6d2d74c135a2ca6d57838597c806046
Author: Andrey Turkin <andrey.turkin at gmail.com>
Date: Wed Jan 14 01:59:03 2009 +0300
ole32/tests: Add test for IContextCallback.
---
dlls/ole32/tests/compobj.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index 450db78..d74138f 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -29,6 +29,9 @@
#include "shlguid.h"
#include "urlmon.h" /* for CLSID_FileProtocol */
+#include "initguid.h"
+#include "ctxtcall.h"
+
#include "wine/test.h"
/* functions that are not present on all versions of Windows */
@@ -967,6 +970,7 @@ static void test_CoGetObjectContext(void)
HRESULT hr;
ULONG refs;
IComThreadingInfo *pComThreadingInfo;
+ IContextCallback *pContextCallback;
APTTYPE apttype;
THDTYPE thdtype;
@@ -996,6 +1000,17 @@ static void test_CoGetObjectContext(void)
refs = IComThreadingInfo_Release(pComThreadingInfo);
ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs);
+ hr = pCoGetObjectContext(&IID_IContextCallback, (void **)&pContextCallback);
+ todo_wine {
+ ok_ole_success(hr, "CoGetObjectContext(ContextCallback)");
+ }
+
+ if (hr == S_OK)
+ {
+ refs = IContextCallback_Release(pContextCallback);
+ ok(refs == 0, "pContextCallback should have 0 refs instead of %d refs\n", refs);
+ }
+
CoUninitialize();
pCoInitializeEx(NULL, COINIT_MULTITHREADED);
@@ -1014,6 +1029,17 @@ static void test_CoGetObjectContext(void)
refs = IComThreadingInfo_Release(pComThreadingInfo);
ok(refs == 0, "pComThreadingInfo should have 0 refs instead of %d refs\n", refs);
+ hr = pCoGetObjectContext(&IID_IContextCallback, (void **)&pContextCallback);
+ todo_wine {
+ ok_ole_success(hr, "CoGetObjectContext(ContextCallback)");
+ }
+
+ if (hr == S_OK)
+ {
+ refs = IContextCallback_Release(pContextCallback);
+ ok(refs == 0, "pContextCallback should have 0 refs instead of %d refs\n", refs);
+ }
+
CoUninitialize();
}
More information about the wine-cvs
mailing list