diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 4bb25e74942..7fc3d4b586c 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -3815,12 +3815,16 @@ DWORD WINAPI InternetConfirmZoneCrossingW( HWND hWnd, LPWSTR szUrlPrev, LPWSTR s return ERROR_SUCCESS; } +static DWORD zone_preference = 3; + /*********************************************************************** * PrivacySetZonePreferenceW (WININET.@) */ DWORD WINAPI PrivacySetZonePreferenceW( DWORD zone, DWORD type, DWORD template, LPCWSTR preference ) { FIXME( "%x %x %x %s: stub\n", zone, type, template, debugstr_w(preference) ); + + zone_preference = template; return 0; } @@ -3830,7 +3834,9 @@ DWORD WINAPI PrivacySetZonePreferenceW( DWORD zone, DWORD type, DWORD template, DWORD WINAPI PrivacyGetZonePreferenceW( DWORD zone, DWORD type, LPDWORD template, 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; } diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 5f36c3d9354..728c8dc2755 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -795,6 +795,33 @@ static void test_IsDomainLegalCookieDomainW(void) 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) @@ -833,4 +860,6 @@ START_TEST(internet) win_skip("IsDomainLegalCookieDomainW (or ordinal 117) is not available\n"); else test_IsDomainLegalCookieDomainW(); + + test_PrivacyGetSetZonePreferenceW(); }