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

This commit is contained in:
Nikolay Sivov 2014-06-14 14:51:50 +04:00 committed by Alexandre Julliard
parent 9475dc58d1
commit 1f92df77a8
1 changed files with 13 additions and 7 deletions

View File

@ -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: