Nikolay Sivov : quartz/tests: Fix couple of test failures running with limited user.

Alexandre Julliard julliard at winehq.org
Mon Jun 16 12:37:49 CDT 2014


Module: wine
Branch: master
Commit: 1f92df77a83df58404dc93e6a25e9f382712ad7a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1f92df77a83df58404dc93e6a25e9f382712ad7a

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sat Jun 14 14:51:50 2014 +0400

quartz/tests: Fix couple of test failures running with limited user.

---

 dlls/quartz/tests/filtermapper.c |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/dlls/quartz/tests/filtermapper.c b/dlls/quartz/tests/filtermapper.c
index a67df1d..d21509d 100644
--- a/dlls/quartz/tests/filtermapper.c
+++ b/dlls/quartz/tests/filtermapper.c
@@ -87,7 +87,7 @@ static void test_fm2_enummatchingfilters(void)
     CLSID clsidFilter1;
     CLSID clsidFilter2;
     IEnumMoniker *pEnum = NULL;
-    BOOL found;
+    BOOL found, registered = TRUE;
 
     ZeroMemory(&rgf2, sizeof(rgf2));
 
@@ -121,7 +121,10 @@ static void test_fm2_enummatchingfilters(void)
     hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL,
                     &CLSID_LegacyAmFilterCategory, NULL, &rgf2);
     if (hr == E_ACCESSDENIED)
+    {
+        registered = FALSE;
         skip("Not authorized to register filters\n");
+    }
     else
     {
         ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr);
@@ -192,13 +195,16 @@ static void test_fm2_enummatchingfilters(void)
         ok(!found, "EnumMatchingFilters should not return the test filter 2\n");
     }
 
-    hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
-            &clsidFilter1);
-    ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+    if (registered)
+    {
+        hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
+                &clsidFilter1);
+        ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
 
-    hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
-            &clsidFilter2);
-    ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+        hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
+                &clsidFilter2);
+        ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+    }
 
     out:
 




More information about the wine-cvs mailing list