Commit deeb3a9f authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Improve the PrivacyGet/SetZonePreferenceW stubs.

parent 76656994
...@@ -3815,12 +3815,16 @@ DWORD WINAPI InternetConfirmZoneCrossingW( HWND hWnd, LPWSTR szUrlPrev, LPWSTR s ...@@ -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, ...@@ -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) ...@@ -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) ...@@ -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();
} }
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