quartz/tests: Add COM aggregation test for NullRenderer. (2nd try)

Michael Stefaniuc mstefani at redhat.de
Sun Jul 1 18:25:43 CDT 2012


---
quartz on Win2K doesn't seem to have the NullRenderer class.
My series doesn't depends on the test nor does the test depend on the
series so it can be applied at any time.



 dlls/quartz/tests/misc.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/dlls/quartz/tests/misc.c b/dlls/quartz/tests/misc.c
index 74c386b..748c0f2 100644
--- a/dlls/quartz/tests/misc.c
+++ b/dlls/quartz/tests/misc.c
@@ -69,6 +69,11 @@ static void test_aggregation(const CLSID clsidOuter, const CLSID clsidInner,
     /* for aggregation, we should only be able to request IUnknown */
     hr = CoCreateInstance(&clsidInner, pUnkOuter, CLSCTX_INPROC_SERVER,
                           &iidInner, (LPVOID*)&pUnkInnerFail);
+    if (hr == REGDB_E_CLASSNOTREG)
+    {
+        skip("Class not registered\n");
+        return;
+    }
     ok(hr == E_NOINTERFACE, "CoCreateInstance returned %x\n", hr);
     ok(pUnkInnerFail == NULL, "pUnkInnerFail is not NULL\n");
 
@@ -157,6 +162,19 @@ static void test_aggregation(const CLSID clsidOuter, const CLSID clsidInner,
     } while (refCount);
 }
 
+static void test_null_renderer_aggregations(void)
+{
+    const IID * iids[] = {
+        &IID_IMediaFilter, &IID_IBaseFilter
+    };
+    int i;
+
+    for (i = 0; i < sizeof(iids) / sizeof(iids[0]); i++)
+    {
+        test_aggregation(CLSID_SystemClock, CLSID_NullRenderer, IID_IReferenceClock, *iids[i]);
+    }
+}
+
 static void test_video_renderer_aggregations(void)
 {
     const IID * iids[] = {
@@ -206,6 +224,7 @@ START_TEST(misc)
 {
     CoInitialize(NULL);
 
+    test_null_renderer_aggregations();
     test_video_renderer_aggregations();
     test_filter_graph_aggregations();
     test_filter_mapper_aggregations();
-- 
1.7.6.5



More information about the wine-patches mailing list