36#define URLZONE_CUSTOM URLZONE_USER_MIN+1
37#define URLZONE_CUSTOM2 URLZONE_CUSTOM+1
39#define DEFINE_EXPECT(func) \
40 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
42#define SET_EXPECT(func) \
43 expect_ ## func = TRUE
45#define CHECK_EXPECT(func) \
47 ok(expect_ ##func, "unexpected call " #func "\n"); \
48 expect_ ## func = FALSE; \
49 called_ ## func = TRUE; \
52#define CHECK_EXPECT2(func) \
54 ok(expect_ ##func, "unexpected call " #func "\n"); \
55 called_ ## func = TRUE; \
58#define CHECK_CALLED(func) \
60 ok(called_ ## func, "expected " #func "\n"); \
61 expect_ ## func = called_ ## func = FALSE; \
64#define SET_CALLED(func) \
66 expect_ ## func = called_ ## func = FALSE; \
86static const WCHAR url1[] = {
'r',
'e',
's',
':',
'/',
'/',
'm',
's',
'h',
't',
'm',
'l',
'.',
'd',
'l',
'l',
87 '/',
'b',
'l',
'a',
'n',
'k',
'.',
'h',
't',
'm',0};
88static const WCHAR url2[] = {
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
89static const WCHAR url3[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'c',
':',
'\\',
'I',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
90static const WCHAR url4[] = {
'f',
'i',
'l',
'e',
':',
's',
'o',
'm',
'e',
'%',
'2',
'0',
'f',
'i',
'l',
'e',
91 '%',
'2',
'e',
'j',
'p',
'g',0};
92static const WCHAR url5[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
93 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
94static const WCHAR url6[] = {
'a',
'b',
'o',
'u',
't',
':',
'b',
'l',
'a',
'n',
'k',0};
95static const WCHAR url7[] = {
'f',
't',
'p',
':',
'/',
'/',
'z',
'o',
'n',
'e',
'3',
96 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'/',
'f',
'i',
'l',
'e',
'.',
't',
'e',
's',
't',0};
97static const WCHAR url8[] = {
't',
'e',
's',
't',
':',
'1',
'2',
'3',
'a',
'b',
'c',0};
98static const WCHAR url9[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
99 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'/',
's',
'i',
't',
'e',
'/',
'a',
'b',
'o',
'u',
't',0};
100static const WCHAR url10[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
's',
'o',
'm',
'e',
'%',
'2',
'0',
'f',
'i',
'l',
'e',
102static const WCHAR url11[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'c',
':',
'/',
'I',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
103static const WCHAR url12[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'c',
':',
'/',
'I',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
104static const WCHAR url13[] = {
'h',
't',
't',
'p',
':',
'g',
'o',
'o',
'g',
'l',
'e',
'.',
'c',
'o',
'm',0};
105static const WCHAR url14[] = {
'z',
'i',
'p',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',0};
106static const WCHAR url15[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'g',
'o',
'o',
'g',
'l',
'e',
'.',
'c',
'o',
'm',
'.',
'u',
'k',0};
107static const WCHAR url16[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'c',
':',0};
108static const WCHAR url17[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'c',
':',
'c',
'\\',0};
109static const WCHAR url18[] = {
'c',
':',
'\\',
't',
'e',
's',
't',
'.',
'h',
't',
'm',0};
112static const WCHAR security_urlW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
't',
'e',
's',
't',
'i',
'n',
'g',0};
113static const WCHAR security_url2W[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'2',0};
114static const WCHAR security_expectedW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
'z',
'i',
'p',0};
115static const WCHAR winetest_to_httpW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
'h',0};
117static const char *
szZoneMapDomainsKey =
"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains";
121static const BYTE secid2[] = {
'*',
':',
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',3,0,0,0};
122static const BYTE secid5[] = {
'h',
't',
't',
'p',
':',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
123 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',3,0,0,0};
124static const BYTE secid6[] = {
'a',
'b',
'o',
'u',
't',
':',
'b',
'l',
'a',
'n',
'k',3,0,0,0};
125static const BYTE secid7[] = {
'f',
't',
'p',
':',
'z',
'o',
'n',
'e',
'3',
126 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',3,0,0,0};
128 {
'f',
'i',
'l',
'e',
':',
's',
'o',
'm',
'e',
'%',
'2',
'0',
'f',
'i',
'l',
'e',
'.',
'j',
'p',
'g',3,0,0,0};
130 {
'z',
'i',
'p',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',3,0,0,0};
132 {
'f',
'i',
'l',
'e',
':',
's',
'o',
'm',
'e',
' ',
'f',
'i',
'l',
'e',
'.',
'j',
'p',
'g',3,0,0,0};
133static const BYTE secid13[] = {
'h',
't',
't',
'p',
':',
'c',
'o',
'm',
'.',
'u',
'k',3,0,0,0};
134static const BYTE secid13_2[] = {
'h',
't',
't',
'p',
':',
'g',
'o',
'o',
'g',
'l',
'e',
'.',
'c',
'o',
'm',
'.',
'u',
'k',3,0,0,0};
137 {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x06,0x46}};
141 {0x10200490,0xfa38,0x11d0,{0xac,0x0e,0x00,0xa0,0xc9,0xf,0xff,0xc0}};
172 if(len1!=len2)
return 1;
181 DWORD dwMaxSubkeyLen, dwMaxValueLen;
199 dwMaxLen =
max(dwMaxSubkeyLen, dwMaxValueLen);
203 if (!(lpszName =
malloc(dwMaxLen)))
236 if (lpszName != szNameBuf)
246 ok(0,
"unexpected call\n");
263 ok(0,
"unexpected call\n");
270 ok(0,
"unexpected call\n");
277 ok(0,
"unexpected call\n");
284 ok(0,
"unexpected call\n");
293 ok(dwAction == URLACTION_FEATURE_ZONE_ELEVATION,
"dwAction = %lx\n", dwAction);
294 ok(cbPolicy ==
sizeof(
DWORD),
"cbPolicy = %ld\n", cbPolicy);
295 ok(!pContext,
"pContext != NULL\n");
307 ok(0,
"unexpected call\n");
314 ok(0,
"unexpected call\n");
321 ok(0,
"unexpected call\n");
349 if(!pCoInternetCreateSecurityManager) {
353 trace(
"Testing security manager...\n");
355 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
356 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08lx\n",
hres);
366 "[%d] MapUrlToZone failed: %08lx, expected %08lx\n",
379 "[%d] GetSecurityId failed: %08lx, expected %08lx\n",
389 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
url10, &
zone, 0);
390 ok(
hres ==
S_OK,
"MapUrlToZone failed: %08lx, expected S_OK\n",
hres);
391 ok(
zone == 3,
"zone=%ld, expected 3\n",
zone);
396 hres = IInternetSecurityManager_GetSecurityId(secmgr,
url10,
buf, &
size, 0);
397 ok(
hres ==
S_OK,
"GetSecurityId failed: %08lx, expected S_OK\n",
hres);
406 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
url13, &
zone, 0);
412 hres = IInternetSecurityManager_GetSecurityId(secmgr,
url13,
buf, &
size, 0);
416 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
url14, &
zone, 0);
417 ok(
hres ==
S_OK,
"MapUrlToZone failed: %08lx, expected S_OK\n",
hres);
418 ok(
zone == URLZONE_INTERNET,
"zone=%ld\n",
zone);
422 hres = IInternetSecurityManager_GetSecurityId(secmgr,
url14,
buf, &
size, 0);
423 ok(
hres ==
S_OK,
"GetSecurityId failed: %08lx, expected S_OK\n",
hres);
428 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
NULL, &
zone, 0);
433 hres = IInternetSecurityManager_GetSecurityId(secmgr,
NULL,
buf, &
size, 0);
435 "GetSecurityId failed: %08lx, expected E_INVALIDARG\n",
hres);
439 "GetSecurityId failed: %08lx, expected E_INVALIDARG\n",
hres);
443 "GetSecurityId failed: %08lx, expected E_INVALIDARG\n",
hres);
445 hres = IInternetSecurityManager_ProcessUrlAction(secmgr,
NULL, URLACTION_SCRIPT_RUN, (
BYTE*)&
policy,
449 IInternetSecurityManager_Release(secmgr);
470 return ie_harden != 0;
484 "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey);
497 "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey);
510 "(0x%lx) got 0x%lx (expected E_FAIL)\n",
action,
hres);
515 sizeof(
DWORD), URLZONEREG_DEFAULT);
517 "(0x%lx) got 0x%lx (expected E_FAIL)\n",
action,
hres);
524 sizeof(
DWORD), URLZONEREG_DEFAULT);
528 if(
policy != URLPOLICY_QUERY) {
535 if(reg_policy == URLPOLICY_DISALLOW)
544 if(reg_policy == URLPOLICY_DISALLOW)
553 if(reg_policy == URLPOLICY_DISALLOW)
561 sizeof(
WCHAR), (
BYTE*)0xdeadbeef, 16, 0, 0);
562 if(reg_policy == URLPOLICY_DISALLOW)
569 if(expect_parse_call)
573 if(expect_parse_call)
575 if(reg_policy == URLPOLICY_DISALLOW)
581 skip(
"IE running in Enhanced Security Configuration\n");
593 sizeof(
DWORD), URLZONEREG_DEFAULT);
595 ok(
policy == URLPOLICY_DISALLOW,
"(%lx) policy=%lx, expected URLPOLICY_DISALLOW\n",
action,
policy);
617 hres = IInternetSecurityManager_ProcessUrlAction(secmgr,
url1, URLACTION_ACTIVEX_RUN, (
BYTE*)&
policy,
619 ok(
hres ==
S_OK,
"ProcessUrlAction(URLACTION_ACTIVEX_RUN) failed: %08lx\n",
hres);
626 &ppolicy, &policy_size, (
BYTE*)&
cs,
sizeof(
cs), 0);
636 trace(
"testing polices...\n");
638 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
639 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08lx\n",
hres);
640 hres = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
641 ok(
hres ==
S_OK,
"CoInternetCreateZoneManager failed: %08lx\n",
hres);
645 test_url_action(secmgr, zonemgr, URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY);
646 test_url_action(secmgr, zonemgr, URLACTION_CHANNEL_SOFTDIST_PERMISSIONS);
654 IInternetSecurityManager_Release(secmgr);
655 IInternetZoneManager_Release(zonemgr);
669 static const WCHAR testing_domain_urlW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
670 'd',
'o',
'm',
'a',
'i',
'n',
'/',0};
690 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
691 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08lx\n",
hres);
693 zone = URLZONE_INVALID;
694 hres = IInternetSecurityManager_MapUrlToZone(secmgr, testing_domain_urlW, &
zone, 0);
703 IInternetSecurityManager_Release(secmgr);
748 skip(
"need admin rights\n");
772 if(!
test->subdomain) {
816 if(
test->subdomain) {
863 {
L"zip://yabadaba.do/", URLZONE_INTERNET},
865 {
L"ftp://testing.google.super.cool/", URLZONE_INTERNET},
873 {
L"test://www.tests.test/", URLZONE_INTERNET},
874 {
L"test://tests.test/", URLZONE_INTERNET},
875 {
L"zip://www.tests.test/", URLZONE_INTERNET},
876 {
L"zip://tests.test/", URLZONE_INTERNET},
878 {
L"http://google.www.testing.com/", URLZONE_INTERNET},
898 trace(
"testing zone domain mappings...\n");
900 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
901 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08lx\n",
hres);
905 static const WCHAR local_machineW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'l',
'o',
'c',
'a',
'l',
906 '.',
'm',
'a',
'c',
'h',
'i',
'n',
'e',
'/',0};
908 hres = IInternetSecurityManager_MapUrlToZone(secmgr, local_machineW, &
zone, 0);
917 zone = URLZONE_INVALID;
919 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
test->url, &
zone, 0);
923 "Expected %ld, but got %ld on test %ld\n",
test->zone,
zone,
i);
926 IInternetSecurityManager_Release(secmgr);
932 skip(
"IE running in Enhanced Security Configuration\n");
934 }
else if(!pCreateUri) {
935 win_skip(
"Skipping zone domain tests, IE too old\n");
939 trace(
"testing zone domains...\n");
954 trace(
"simple zone manager tests...\n");
956 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
957 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%lx\n",
hr);
964 IUnknown_Release(
punk);
966 hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManager, (
void **) &
punk);
969 IUnknown_Release(
punk);
972 hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx, (
void **) &
punk);
974 IUnknown_Release(
punk);
976 hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx2, (
void **) &
punk);
978 "got 0x%lx (expected S_OK)\n",
hr);
980 IUnknown_Release(
punk);
982 win_skip(
"InternetZoneManagerEx2 not supported\n");
986 win_skip(
"InternetZoneManagerEx not supported\n");
988 hr = IInternetZoneManager_Release(zonemgr);
989 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1002 trace(
"testing zone enumerator...\n");
1004 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1005 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%lx\n",
hr);
1010 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum,
NULL, 0);
1012 "got 0x%lx with 0x%lx (expected E_INVALIDARG with 0xdeadbeef)\n",
hr, dwEnum);
1015 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr,
NULL, &dwCount, 0);
1017 "got 0x%lx and 0x%lx (expected E_INVALIDARG and 0xdeadbeef)\n",
hr, dwCount);
1021 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0xffffffff);
1022 ok((
hr ==
E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef),
1023 "got 0x%lx with 0x%lx and 0x%lx (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n",
1024 hr, dwEnum, dwCount);
1028 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 1);
1029 ok((
hr ==
E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef),
1030 "got 0x%lx with 0x%lx and 0x%lx (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n",
1031 hr, dwEnum, dwCount);
1036 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0);
1037 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1041 dwCount2=0xdeadbeef;
1042 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum2, &dwCount2, 0);
1043 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1046 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum2);
1047 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1050 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum);
1051 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1054 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum);
1059 hr = IInternetZoneManager_Release(zonemgr);
1060 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1070 trace(
"testing GetZoneActionPolixy...\n");
1072 hres = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1073 ok(
hres ==
S_OK,
"CoInternetCreateZoneManager failed: %08lx\n",
hres);
1077 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3,
action,
buf,
1078 sizeof(
DWORD), URLZONEREG_DEFAULT);
1080 ok(*(
DWORD*)
buf == URLPOLICY_CREDENTIALS_SILENT_LOGON_OK ||
1081 *(
DWORD*)
buf == URLPOLICY_CREDENTIALS_MUST_PROMPT_USER ||
1082 *(
DWORD*)
buf == URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT ||
1083 *(
DWORD*)
buf == URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY,
1084 "unexpected policy=%ld\n", *(
DWORD*)
buf);
1086 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3,
action,
NULL,
1087 sizeof(
DWORD), URLZONEREG_DEFAULT);
1090 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3,
action,
buf,
1091 2, URLZONEREG_DEFAULT);
1094 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, 0x1fff,
buf,
1095 sizeof(
DWORD), URLZONEREG_DEFAULT);
1097 "(0x%lx) got 0x%lx (expected E_FAIL)\n",
action,
hres);
1099 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 13,
action,
buf,
1100 sizeof(
DWORD), URLZONEREG_DEFAULT);
1103 IInternetZoneManager_Release(zonemgr);
1115 trace(
"testing GetZoneAt...\n");
1117 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1118 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%lx\n",
hr);
1122 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0);
1128 IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, 0,
NULL);
1131 dwZone = 0xdeadbeef;
1132 hr = IInternetZoneManager_GetZoneAt(zonemgr, 0xdeadbeef, 0, &dwZone);
1134 "got 0x%lx with 0x%lx (expected E_INVALIDARG)\n",
hr, dwZone);
1136 for (
i = 0;
i < dwCount;
i++)
1138 dwZone = 0xdeadbeef;
1139 hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum,
i, &dwZone);
1140 ok(
hr ==
S_OK,
"#%ld: got x%lx with %ld (expected S_OK)\n",
i,
hr, dwZone);
1143 dwZone = 0xdeadbeef;
1145 hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, dwCount, &dwZone);
1147 "got 0x%lx with 0x%lx (expected E_INVALIDARG)\n",
hr, dwZone);
1149 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum);
1150 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1153 hr = IInternetZoneManager_Release(zonemgr);
1154 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1161 ZONEATTRIBUTES* pZA = (ZONEATTRIBUTES*)
buffer;
1165 trace(
"testing GetZoneAttributes...\n");
1167 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1168 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%lx\n",
hr);
1173 for (
i = 0;
i < 5;
i++) {
1175 hr = IInternetZoneManager_GetZoneAttributes(zonemgr,
i, pZA);
1176 ok(
hr ==
S_OK,
"#%ld: got 0x%lx (expected S_OK)\n",
i,
hr);
1182 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA);
1183 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1184 ok((pZA->cbSize == 0) || (pZA->cbSize ==
sizeof(ZONEATTRIBUTES)),
1185 "got cbSize = %ld (expected 0)\n", pZA->cbSize);
1189 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA);
1190 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1191 ok((pZA->cbSize == 64) || (pZA->cbSize ==
sizeof(ZONEATTRIBUTES)),
1192 "got cbSize = %ld (expected 64)\n", pZA->cbSize);
1195 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA);
1196 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1197 ok((pZA->cbSize == 0xffffffff) || (pZA->cbSize ==
sizeof(ZONEATTRIBUTES)),
1198 "got cbSize = 0x%lx (expected 0xffffffff)\n", pZA->cbSize);
1202 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0xdeadbeef, pZA);
1204 "got 0x%lx (expected S_OK or E_FAIL)\n",
hr);
1206 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0,
NULL);
1209 hr = IInternetZoneManager_Release(zonemgr);
1210 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1217 ZONEATTRIBUTES* pZA = (ZONEATTRIBUTES*)
buffer;
1223 trace(
"testing SetZoneAttributes...\n");
1224 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1225 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%lx\n",
hr);
1230 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, URLZONE_LOCAL_MACHINE, pZA);
1231 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1241 pZA->cbSize =
sizeof(ZONEATTRIBUTES);
1248 win_skip(
"SetZoneAttributes not supported: IE too old\n");
1251 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1254 pZA->cbSize =
sizeof(ZONEATTRIBUTES) +
sizeof(
DWORD);
1256 ok(
hr ==
S_OK,
"got 0x%lx for sizeof(ZONEATTRIBUTES) + sizeof(DWORD) (expected S_OK)\n",
hr);
1258 pZA->cbSize =
sizeof(ZONEATTRIBUTES) -
sizeof(
DWORD);
1260 ok(
hr ==
S_OK,
"got 0x%lx for sizeof(ZONEATTRIBUTES) - sizeof(DWORD) (expected S_OK)\n",
hr);
1264 ok(
hr ==
S_OK,
"got 0x%lx for size 0 (expected S_OK)\n",
hr);
1277 "got %lu with %p (expected ERROR_FILE_NOT_FOUND with NULL)\n",
res, hkey);
1285 hr = IInternetZoneManager_Release(zonemgr);
1286 ok(
hr ==
S_OK,
"got 0x%lx (expected S_OK)\n",
hr);
1297 trace(
"testing marshalling...\n");
1299 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
1300 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08lx\n",
hres);
1304 hres = IInternetSecurityManager_QueryInterface(secmgr, &
IID_IUnknown, (
void**)&unk);
1308 ok(
hres ==
S_OK,
"CreateStreamOnHGlobal returned: %08lx\n",
hres);
1313 "CoMarshalInterface returned: %08lx\n",
hres);
1316 IUnknown_Release(unk);
1317 IInternetSecurityManager_Release(secmgr);
1322 const WCHAR url5_out[] = {
'h',
't',
't',
'p',
':',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
1323 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
1324 const WCHAR url7_out[] = {
'f',
't',
'p',
':',
'z',
'o',
'n',
'e',
'3',
'.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
1334 trace(
"testing CoInternetGetSecurityUrl...\n");
1337 hres = pCoInternetGetSecurityUrl(
in[
i], &sec, PSU_DEFAULT, 0);
1338 ok(
hres ==
S_OK,
"(%ld) CoInternetGetSecurityUrl returned: %08lx\n",
i,
hres);
1340 ok(!
strcmp_w(sec, out_default[
i]),
"(%ld) Got %s, expected %s\n",
1345 hres = pCoInternetGetSecurityUrl(
in[
i], &sec, PSU_SECURITY_URL_ONLY, 0);
1346 ok(
hres ==
S_OK,
"(%ld) CoInternetGetSecurityUrl returned: %08lx\n",
i,
hres);
1348 ok(!
strcmp_w(sec, out_securl[
i]),
"(%ld) Got %s, expected %s\n",
1356 SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected);
1359 ok(
hres ==
S_OK,
"CoInternetGetSecurityUrl returned 0x%08lx, expected S_OK\n",
hres);
1373 ok(0,
"unexpected call\n");
1393 ok(pwzResult !=
NULL,
"pwzResult == NULL\n");
1394 ok(pcchResult !=
NULL,
"pcchResult == NULL\n");
1395 ok(!dwParseFlags,
"Expected 0, but got 0x%08lx\n", dwParseFlags);
1397 switch(ParseAction) {
1398 case PARSE_SECURITY_URL:
1401 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %ld\n", cchResult);
1405 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %ld\n", cchResult);
1409 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %ld\n", cchResult);
1414 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %ld\n", cchResult);
1428 case PARSE_SECURITY_DOMAIN:
1434 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %ld\n", cchResult);
1438 ok(0,
"Unexpected call, ParseAction=%d pwzUrl=%s\n", ParseAction,
1446 if(*pcchResult > cchResult)
1456 ok(0,
"unexpected call\n");
1463 ok(0,
"unexpected call\n");
1471 ok(0,
"unexpected call\n");
1494 ok(0,
"unexpected call\n");
1511 ok(0,
"unexpected call\n");
1517 ok(0,
"unexpected call\n");
1545 IInternetSession_Release(
session);
1552 hr = pCoInternetGetSession(0, &
session, 0);
1553 ok(
hr ==
S_OK,
"CoInternetGetSession failed: 0x%08lx\n",
hr);
1558 ok(
hr ==
S_OK,
"UnregisterNameSpace failed: 0x%08lx\n",
hr);
1560 IInternetSession_Release(
session);
1563static const struct {
1572 {
L"index.htm", Uri_CREATE_ALLOW_RELATIVE,
"*:index.html",
S_OK,
L"*:index.htm",
S_OK},
1573 {
L"file://c:\\Index.htm", Uri_CREATE_FILE_USE_DOS_PATH,
"file:///c:/Index.htm",
S_OK,
L"file:///c:/Index.htm",
S_OK},
1576 {
L"http://www.zone3.winetest/", 0,
"http://www.zone3.winetest/",
S_OK,
L"http://www.zone3.winetest/",
S_OK},
1577 {
L"about:blank", 0,
"about:blank",
S_OK,
L"about:blank",
S_OK},
1578 {
L"ftp://zone3.winetest/file.test", 0,
"ftp://zone3.winetest/file.test",
S_OK,
L"ftp://zone3.winetest/file.test",
S_OK},
1579 {
L"test:123abc", 0,
"test:123abc",
S_OK,
L"test:123abc",
S_OK},
1580 {
L"http:google.com/test.file", 0,
"http:google.com/test.file",
S_OK,
L"http:google.com/test.file",
S_OK},
1581 {
L"ftp://test@ftp.winehq.org/", 0,
"ftp://ftp.winehq.org/",
S_OK,
L"ftp://ftp.winehq.org/",
S_OK},
1582 {
L"test://google@ftp.winehq.org/", 0,
"test://google@ftp.winehq.org/",
S_OK,
L"test://google@ftp.winehq.org/",
S_OK}
1591 trace(
"testing CoInternetGetSecurityUrlEx...\n");
1593 hr = pCoInternetGetSecurityUrlEx(
NULL,
NULL, PSU_DEFAULT, 0);
1594 ok(
hr ==
E_INVALIDARG,
"CoInternetGetSecurityUrlEx returned 0x%08lx, expected E_INVALIDARG\n",
hr);
1596 result = (
void*) 0xdeadbeef;
1597 hr = pCoInternetGetSecurityUrlEx(
NULL, &
result, PSU_DEFAULT, 0);
1598 ok(
hr ==
E_INVALIDARG,
"CoInternetGetSecurityUrlEx returned 0x%08lx, expected E_INVALIDARG\n",
hr);
1605 ok(
hr ==
S_OK,
"CreateUri returned 0x%08lx on test %ld\n",
hr,
i);
1609 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_DEFAULT, 0);
1612 "CoInternetGetSecurityUrlEx returned 0x%08lx, expected 0x%08lx on test %ld\n",
1619 ok(
hr ==
S_OK,
"GetDisplayUri returned 0x%08lx on test %ld\n",
hr,
i);
1623 "Expected %s but got %s on test %ld\n",
1632 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_SECURITY_URL_ONLY, 0);
1635 "CoInternetGetSecurityUrlEx returned 0x%08lx, expected 0x%08lx on test %ld\n",
1642 ok(
hr ==
S_OK,
"GetDisplayUri returned 0x%08lx on test %ld\n",
hr,
i);
1646 "Expected %s but got %s on test %ld\n",
1655 if(
uri) IUri_Release(
uri);
1664 trace(
"testing CoInternetGetSecurityUrlEx for pluggable protocols...\n");
1667 ok(
hr ==
S_OK,
"CreateUri returned 0x%08lx\n",
hr);
1671 SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected);
1673 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_DEFAULT, 0);
1674 ok(
hr ==
S_OK,
"CoInternetGetSecurityUrlEx returned 0x%08lx, expected S_OK\n",
hr);
1684 ok(
hr ==
S_OK,
"GetAbsoluteUri returned 0x%08lx\n",
hr);
1698 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_SECURITY_URL_ONLY, 0);
1699 ok(
hr ==
S_OK,
"CoInternetGetSecurityUrlEx returned 0x%08lx, expected S_OK\n",
hr);
1708 ok(
hr ==
S_OK,
"GetAbsoluteUri returned 0x%08lx\n",
hr);
1717 if(
uri) IUri_Release(
uri);
1720static const BYTE secidex2_1[] = {
'z',
'i',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',
'/',3,0,0,0};
1721static const BYTE secidex2_2[] = {
'z',
'i',
'p',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',3,0,0,0};
1722static const BYTE secidex2_3[] = {
'*',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',3,0,0,0};
1724static const struct {
1741 {
L"/file/testing/test.test", Uri_CREATE_ALLOW_RELATIVE, 0, URLZONE_INTERNET,
FALSE,
NULL, 0,
E_INVALIDARG},
1760 static const WCHAR domainW[] = {
'c',
'o',
'm',
'.',
'u',
'k',0};
1763 win_skip(
"Skipping SecurityManagerEx2, IE is too old\n");
1767 trace(
"Testing SecurityManagerEx2...\n");
1769 hres = pCoInternetCreateSecurityManager(
NULL, &sec_mgr, 0);
1770 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08lx\n",
hres);
1772 hres = IInternetSecurityManager_QueryInterface(sec_mgr, &IID_IInternetSecurityManagerEx2, (
void**)&sec_mgr2);
1773 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetSecurityManagerEx2) failed: %08lx\n",
hres);
1779 ok(
zone == URLZONE_INVALID,
"zone was %ld\n",
zone);
1781 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
NULL,
buf, &buf_size, 0);
1783 ok(buf_size ==
sizeof(
buf),
"buf_size was %ld\n", buf_size);
1791 buf_size =
sizeof(
buf);
1792 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
NULL, &buf_size, 0);
1794 ok(buf_size ==
sizeof(
buf),
"bug_size was %ld\n", buf_size);
1796 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf,
NULL, 0);
1803 zone = URLZONE_INVALID;
1816 buf_size =
sizeof(
buf);
1819 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf, &buf_size, 0);
1837 buf_size =
sizeof(
buf);
1840 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf, &buf_size, (
DWORD_PTR)domainW);
1845 buf_size =
sizeof(
buf);
1848 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf, &buf_size, 0);
1850 ok(buf_size ==
sizeof(
secid13_2),
"buf_size was %ld\n", buf_size);
1855 IInternetSecurityManagerEx2_Release(sec_mgr2);
1856 IInternetSecurityManager_Release(sec_mgr);
1862 const WCHAR *url_from;
1863 const WCHAR *url_to;
1868 {
L"http://www.winehq.org",
L"http://www.winehq.org", 0,
S_FALSE, URLPOLICY_ALLOW },
1869 {
L"http://www.winehq.org",
L"http://www.winehq.org", 0,
S_OK, URLPOLICY_DISALLOW },
1870 {
L"http://www.winehq.org",
L"http://www.codeweavers.com", 0,
S_FALSE, URLPOLICY_ALLOW },
1871 {
L"http://www.winehq.org",
L"http://www.codeweavers.com", 0,
S_OK, URLPOLICY_DISALLOW },
1872 {
L"http://www.winehq.org",
L"http://www.winehq.org", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1873 {
L"http://www.winehq.org",
L"http://www.winehq.org/dir", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1874 {
L"http://www.winehq.org",
L"http://www.codeweavers.com", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1875 {
L"http://www.winehq.org",
L"ftp://winehq.org", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1876 {
L"http://www.winehq.org",
L"ftp://winehq.org", GET_FEATURE_FROM_PROCESS|0x100,
S_FALSE, URLPOLICY_ALLOW },
1877 {
L"http://www.winehq.org",
L"ftp://winehq.org", GET_FEATURE_FROM_REGISTRY,
S_FALSE, URLPOLICY_ALLOW },
1883 if(!pCoInternetIsFeatureZoneElevationEnabled || !pCoInternetIsFeatureEnabled
1884 || !pCoInternetIsFeatureEnabledForUrl) {
1885 win_skip(
"Skipping CoInternetIsFeatureZoneElevationEnabled tests\n");
1893 trace(
"Testing CoInternetIsFeatureZoneElevationEnabled... (%lx)\n",
hres);
1897 testcases[
i].policy_flags = URLPOLICY_ALLOW;
1903 i = called_ProcessUrlAction;
1906 skip(
"CoInternetIsFeatureZoneElevationEnabled does not use passed ISecurityManager\n");
1911 if(testcases[
i].policy_flags != -1) {
1915 hres = pCoInternetIsFeatureZoneElevationEnabled(testcases[
i].url_from, testcases[
i].url_to,
1917 ok(
hres == testcases[
i].
hres,
"%d) CoInternetIsFeatureZoneElevationEnabled returned %lx\n",
i,
hres);
1918 if(testcases[
i].policy_flags != -1)
1921 if(testcases[
i].policy_flags != -1)
1925 ok(
hres == testcases[
i].
hres,
"%d) CoInternetIsFeatureEnabledForUrl returned %lx\n",
i,
hres);
1926 if(testcases[
i].policy_flags != -1)
1938 pCoInternetCreateSecurityManager = (
void*)
GetProcAddress(hurlmon,
"CoInternetCreateSecurityManager");
1939 pCoInternetCreateZoneManager = (
void*)
GetProcAddress(hurlmon,
"CoInternetCreateZoneManager");
1940 pCoInternetGetSecurityUrl = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSecurityUrl");
1941 pCoInternetGetSecurityUrlEx = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSecurityUrlEx");
1943 pCoInternetGetSession = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSession");
1944 pCoInternetIsFeatureEnabled = (
void*)
GetProcAddress(hurlmon,
"CoInternetIsFeatureEnabled");
1945 pCoInternetIsFeatureEnabledForUrl = (
void*)
GetProcAddress(hurlmon,
"CoInternetIsFeatureEnabledForUrl");
1946 pCoInternetIsFeatureZoneElevationEnabled = (
void*)
GetProcAddress(hurlmon,
"CoInternetIsFeatureZoneElevationEnabled");
1948 if (!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager ||
1949 !pCoInternetGetSecurityUrl) {
1950 win_skip(
"Various CoInternet* functions not present in IE 4.0\n");
1965 if(!pCoInternetGetSecurityUrlEx || !pCreateUri)
1966 win_skip(
"Skipping CoInternetGetSecurityUrlEx tests, IE too old\n");
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegEnumValueA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpdwReserved, _Out_opt_ LPDWORD lpdwType, _Out_opt_ LPBYTE lpData, _Inout_opt_ LPDWORD lpcbData)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegEnumKeyExA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
void WINAPI CoTaskMemFree(void *ptr)
HRESULT WINAPI CoMarshalInterface(IStream *stream, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
#define GetProcAddress(x, y)
#define ERROR_ACCESS_DENIED
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
GLuint GLuint GLsizei GLenum type
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define todo_wine_if(is_todo)
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static PROCESS_INFORMATION pi
static IInternetProtocolInfo protocol_info
static const BYTE secid5[]
static void test_zone_domain_cache(void)
static const GUID CLSID_TestActiveX
static const WCHAR url6[]
static void test_GetZoneAt(void)
static void test_GetZoneAttributes(void)
static const BYTE secid7[]
static HRESULT WINAPI SecurityManager_GetSecurityId(IInternetSecurityManager *This, LPCWSTR pwszUrl, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
static BOOL register_zone_domains(void)
static const WCHAR url15[]
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
static const WCHAR security_url2W[]
static void test_CoInternetIsFeatureZoneElevationEnabled(void)
static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
static const WCHAR winetest_to_httpW[]
static const struct @1883 sec_url_ex_tests[]
static const zone_mapping_test zone_mapping_tests[]
static HRESULT WINAPI InternetProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, QUERYOPTION OueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved)
static void test_SecurityManagerEx2(void)
static const IClassFactoryVtbl ClassFactoryVtbl
static HRESULT WINAPI SecurityManager_GetSecuritySite(IInternetSecurityManager *This, IInternetSecurityMgrSite **ppSite)
const WCHAR * default_uri
static DWORD ProcessUrlAction_policy
static const zone_domain_mapping zone_domain_mappings[]
static void unregister_protocols(void)
static HRESULT WINAPI SecurityManager_SetZoneMapping(IInternetSecurityManager *This, DWORD dwZone, LPCWSTR lpszPattern, DWORD dwFlags)
static void test_CoInternetCreateZoneManager(void)
static const WCHAR url1[]
static void test_InternetSecurityMarshalling(void)
static const WCHAR url5[]
#define CHECK_EXPECT(func)
static int strcmp_w(const WCHAR *str1, const WCHAR *str2)
static ULONG WINAPI SecurityManager_Release(IInternetSecurityManager *This)
static const WCHAR security_expectedW[]
static int called_securl_http
static void test_SecurityManager(void)
static const WCHAR url4[]
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
#define DEFINE_EXPECT(func)
static HRESULT WINAPI SecurityManager_MapUrlToZone(IInternetSecurityManager *This, LPCWSTR pwszUrl, DWORD *pdwZone, DWORD dwFlags)
static HRESULT WINAPI SecurityManager_ProcessUrlAction(IInternetSecurityManager *This, LPCWSTR pwszUrl, DWORD dwAction, BYTE *pPolicy, DWORD cbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved)
static const BYTE secidex2_1[]
static const struct @1884 sec_mgr_ex2_tests[]
static void test_zone_domains(void)
static const BYTE secidex2_2[]
static void test_SetZoneAttributes(void)
static const WCHAR url8[]
static HRESULT WINAPI InternetProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
static const BYTE secid2[]
static void test_polices(void)
static const WCHAR url14[]
static void test_GetZoneActionPolicy(void)
static HRESULT WINAPI InternetProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI SecurityManager_SetSecuritySite(IInternetSecurityManager *This, IInternetSecurityMgrSite *pSite)
static const BYTE secidex2_3[]
static HRESULT WINAPI SecurityManager_QueryCustomPolicy(IInternetSecurityManager *This, LPCWSTR pwszUrl, REFGUID guidKey, BYTE **ppPolicy, DWORD *pcbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwReserved)
static void test_CreateZoneEnumerator(void)
static void register_protocols(void)
static void run_child_process(void)
const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY
static const WCHAR url11[]
static void test_InternetGetSecurityUrlEx_Pluggable(void)
static ULONG WINAPI InternetProtocolInfo_AddRef(IInternetProtocolInfo *iface)
static void test_special_url_action(IInternetSecurityManager *secmgr, IInternetZoneManager *zonemgr, DWORD action)
static const BYTE secid13[]
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
static const WCHAR security_urlW[]
static void test_activex(IInternetSecurityManager *secmgr)
static void unregister_zone_domains(void)
static const char * szZoneMapDomainsKey
static LONG myRegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey)
static const WCHAR url2[]
static void test_InternetGetSecurityUrlEx(void)
static const BYTE secid10_2[]
static const WCHAR url16[]
static const WCHAR winetestW[]
static HRESULT WINAPI SecurityManager_QueryInterface(IInternetSecurityManager *This, REFIID riid, void **ppvObject)
#define CHECK_CALLED(func)
static struct secmgr_test secmgr_tests[]
const char * security_uri
static void test_InternetGetSecurityUrl(void)
static const BYTE secid14[]
static const char * szInternetSettingsKey
static const BYTE secid1[]
static const WCHAR url13[]
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
static ULONG WINAPI InternetProtocolInfo_Release(IInternetProtocolInfo *iface)
static const WCHAR url9[]
static HRESULT WINAPI InternetProtocolInfo_QueryInterface(IInternetProtocolInfo *iface, REFIID riid, void **ppv)
static void test_zone_domain_mappings(void)
static const BYTE secid6[]
static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static const BYTE secid13_2[]
static IClassFactory protocol_cf
static const WCHAR url17[]
static const IInternetSecurityManagerVtbl SecurityManagerVtbl
static HRESULT WINAPI SecurityManager_GetZoneMappings(IInternetSecurityManager *This, DWORD dwZone, IEnumString **ppenumString, DWORD dwFlags)
static ULONG WINAPI SecurityManager_AddRef(IInternetSecurityManager *This)
static BOOL is_ie_hardened(void)
static const BYTE secid10[]
static const WCHAR url3[]
static void test_url_action(IInternetSecurityManager *secmgr, IInternetZoneManager *zonemgr, DWORD action)
static IInternetSecurityManager security_manager
static const WCHAR url10[]
static const WCHAR url12[]
static const WCHAR url18[]
static const IInternetProtocolInfoVtbl InternetProtocolInfoVtbl
static const WCHAR url7[]
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualGUID(rguid1, rguid2)
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
XML_HIDDEN void xmlParserErrors const char const xmlChar const xmlChar * str2
XML_HIDDEN void xmlParserErrors const char const xmlChar * str1
DWORD WINAPI GetLastError(void)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define REGDB_E_IIDNOTREG
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)