wininet: Improve the PrivacyGet/SetZonePreferenceW stubs.
This commit is contained in:
parent
7665699411
commit
deeb3a9fcb
|
@ -3815,12 +3815,16 @@ DWORD WINAPI InternetConfirmZoneCrossingW( HWND hWnd, LPWSTR szUrlPrev, LPWSTR s
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static DWORD zone_preference = 3;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* PrivacySetZonePreferenceW (WININET.@)
|
* PrivacySetZonePreferenceW (WININET.@)
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI PrivacySetZonePreferenceW( DWORD zone, DWORD type, DWORD template, LPCWSTR preference )
|
DWORD WINAPI PrivacySetZonePreferenceW( DWORD zone, DWORD type, DWORD template, LPCWSTR preference )
|
||||||
{
|
{
|
||||||
FIXME( "%x %x %x %s: stub\n", zone, type, template, debugstr_w(preference) );
|
FIXME( "%x %x %x %s: stub\n", zone, type, template, debugstr_w(preference) );
|
||||||
|
|
||||||
|
zone_preference = template;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3830,7 +3834,9 @@ DWORD WINAPI PrivacySetZonePreferenceW( DWORD zone, DWORD type, DWORD template,
|
||||||
DWORD WINAPI PrivacyGetZonePreferenceW( DWORD zone, DWORD type, LPDWORD template,
|
DWORD WINAPI PrivacyGetZonePreferenceW( DWORD zone, DWORD type, LPDWORD template,
|
||||||
LPWSTR preference, LPDWORD length )
|
LPWSTR preference, LPDWORD length )
|
||||||
{
|
{
|
||||||
FIXME( "%x %x: stub\n", zone, type );
|
FIXME( "%x %x %p %p %p: stub\n", zone, type, template, preference, length );
|
||||||
|
|
||||||
|
if (template) *template = zone_preference;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -795,6 +795,33 @@ static void test_IsDomainLegalCookieDomainW(void)
|
||||||
ok(!ret, "IsDomainLegalCookieDomainW succeeded\n");
|
ok(!ret, "IsDomainLegalCookieDomainW succeeded\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_PrivacyGetSetZonePreferenceW(void)
|
||||||
|
{
|
||||||
|
DWORD ret, zone, type, template, old_template;
|
||||||
|
|
||||||
|
zone = 3;
|
||||||
|
type = 0;
|
||||||
|
ret = PrivacyGetZonePreferenceW(zone, type, NULL, NULL, NULL);
|
||||||
|
ok(ret == 0, "expected ret == 0, got %u\n", ret);
|
||||||
|
|
||||||
|
old_template = 0;
|
||||||
|
ret = PrivacyGetZonePreferenceW(zone, type, &old_template, NULL, NULL);
|
||||||
|
ok(ret == 0, "expected ret == 0, got %u\n", ret);
|
||||||
|
|
||||||
|
template = 5;
|
||||||
|
ret = PrivacySetZonePreferenceW(zone, type, template, NULL);
|
||||||
|
ok(ret == 0, "expected ret == 0, got %u\n", ret);
|
||||||
|
|
||||||
|
template = 0;
|
||||||
|
ret = PrivacyGetZonePreferenceW(zone, type, &template, NULL, NULL);
|
||||||
|
ok(ret == 0, "expected ret == 0, got %u\n", ret);
|
||||||
|
ok(template == 5, "expected template == 5, got %u\n", template);
|
||||||
|
|
||||||
|
template = 5;
|
||||||
|
ret = PrivacySetZonePreferenceW(zone, type, old_template, NULL);
|
||||||
|
ok(ret == 0, "expected ret == 0, got %u\n", ret);
|
||||||
|
}
|
||||||
|
|
||||||
/* ############################### */
|
/* ############################### */
|
||||||
|
|
||||||
START_TEST(internet)
|
START_TEST(internet)
|
||||||
|
@ -833,4 +860,6 @@ START_TEST(internet)
|
||||||
win_skip("IsDomainLegalCookieDomainW (or ordinal 117) is not available\n");
|
win_skip("IsDomainLegalCookieDomainW (or ordinal 117) is not available\n");
|
||||||
else
|
else
|
||||||
test_IsDomainLegalCookieDomainW();
|
test_IsDomainLegalCookieDomainW();
|
||||||
|
|
||||||
|
test_PrivacyGetSetZonePreferenceW();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue