Commit e5e23044 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

quartz/tests: Skip some tests if not allowed to register filters.

parent 344ef82b
...@@ -1811,6 +1811,10 @@ static void test_render_filter_priority(void) ...@@ -1811,6 +1811,10 @@ static void test_render_filter_priority(void)
hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter2, wszFilterInstanceName2, NULL, hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter2, wszFilterInstanceName2, NULL,
&CLSID_LegacyAmFilterCategory, NULL, &rgf2); &CLSID_LegacyAmFilterCategory, NULL, &rgf2);
if (hr == E_ACCESSDENIED)
skip("Not authorized to register filters\n");
else
{
ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr);
rgf2.dwMerit = MERIT_PREFERRED; rgf2.dwMerit = MERIT_PREFERRED;
...@@ -1844,6 +1848,7 @@ static void test_render_filter_priority(void) ...@@ -1844,6 +1848,7 @@ static void test_render_filter_priority(void)
get_connected_filter_name(ptestfilter, ConnectedFilterName1); get_connected_filter_name(ptestfilter, ConnectedFilterName1);
ok(!lstrcmp(ConnectedFilterName1, "TestfilterInstance3"), ok(!lstrcmp(ConnectedFilterName1, "TestfilterInstance3"),
"unexpected connected filter: %s\n", ConnectedFilterName1); "unexpected connected filter: %s\n", ConnectedFilterName1);
}
hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL, hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
&CLSID_TestFilter2); &CLSID_TestFilter2);
......
...@@ -117,6 +117,10 @@ static void test_fm2_enummatchingfilters(void) ...@@ -117,6 +117,10 @@ static void test_fm2_enummatchingfilters(void)
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL, hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL,
&CLSID_LegacyAmFilterCategory, NULL, &rgf2); &CLSID_LegacyAmFilterCategory, NULL, &rgf2);
if (hr == E_ACCESSDENIED)
skip("Not authorized to register filters\n");
else
{
ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr);
rgPins2[0].dwFlags = 0; rgPins2[0].dwFlags = 0;
...@@ -170,6 +174,7 @@ static void test_fm2_enummatchingfilters(void) ...@@ -170,6 +174,7 @@ static void test_fm2_enummatchingfilters(void)
found = enum_find_filter(wszFilterName1, pEnum); found = enum_find_filter(wszFilterName1, pEnum);
ok(found, "EnumMatchingFilters failed to return the test filter 1\n"); ok(found, "EnumMatchingFilters failed to return the test filter 1\n");
} }
}
if (pEnum) IEnumMoniker_Release(pEnum); if (pEnum) IEnumMoniker_Release(pEnum);
pEnum = NULL; pEnum = NULL;
...@@ -245,6 +250,10 @@ static void test_legacy_filter_registration(void) ...@@ -245,6 +250,10 @@ static void test_legacy_filter_registration(void)
/* Register---- functions need a filter class key to write pin and pin media type data to. Create a bogus /* Register---- functions need a filter class key to write pin and pin media type data to. Create a bogus
* class key for it. */ * class key for it. */
lRet = RegCreateKeyExA(HKEY_CLASSES_ROOT, szRegKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL); lRet = RegCreateKeyExA(HKEY_CLASSES_ROOT, szRegKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
if (lRet == ERROR_ACCESS_DENIED)
skip("Not authorized to register filters\n");
else
{
ok(lRet == ERROR_SUCCESS, "RegCreateKeyExA failed with %x\n", HRESULT_FROM_WIN32(lRet)); ok(lRet == ERROR_SUCCESS, "RegCreateKeyExA failed with %x\n", HRESULT_FROM_WIN32(lRet));
/* Set default value - this is interpreted as "friendly name" later. */ /* Set default value - this is interpreted as "friendly name" later. */
...@@ -306,6 +315,7 @@ static void test_legacy_filter_registration(void) ...@@ -306,6 +315,7 @@ static void test_legacy_filter_registration(void)
lRet = RegDeleteKeyA(hKey, szGuidstring); lRet = RegDeleteKeyA(hKey, szGuidstring);
ok(lRet == ERROR_SUCCESS, "RegDeleteKeyA failed with %x\n", HRESULT_FROM_WIN32(lRet)); ok(lRet == ERROR_SUCCESS, "RegDeleteKeyA failed with %x\n", HRESULT_FROM_WIN32(lRet));
}
if (hKey) RegCloseKey(hKey); if (hKey) RegCloseKey(hKey);
hKey = NULL; hKey = NULL;
...@@ -420,6 +430,11 @@ static void test_register_filter_with_null_clsMinorType(void) ...@@ -420,6 +430,11 @@ static void test_register_filter_with_null_clsMinorType(void)
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL, hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL,
&CLSID_LegacyAmFilterCategory, NULL, &rgf2); &CLSID_LegacyAmFilterCategory, NULL, &rgf2);
if (hr == E_ACCESSDENIED)
{
skip("Not authorized to register filters\n");
goto out;
}
ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr);
hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter1); hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment