37#define URLZONE_CUSTOM URLZONE_USER_MIN+1
38#define URLZONE_CUSTOM2 URLZONE_CUSTOM+1
40#define DEFINE_EXPECT(func) \
41 static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
43#define SET_EXPECT(func) \
44 expect_ ## func = TRUE
46#define CHECK_EXPECT(func) \
48 ok(expect_ ##func, "unexpected call " #func "\n"); \
49 expect_ ## func = FALSE; \
50 called_ ## func = TRUE; \
53#define CHECK_EXPECT2(func) \
55 ok(expect_ ##func, "unexpected call " #func "\n"); \
56 called_ ## func = TRUE; \
59#define CHECK_CALLED(func) \
61 ok(called_ ## func, "expected " #func "\n"); \
62 expect_ ## func = called_ ## func = FALSE; \
65#define SET_CALLED(func) \
67 expect_ ## func = called_ ## func = FALSE; \
87static const WCHAR url1[] = {
'r',
'e',
's',
':',
'/',
'/',
'm',
's',
'h',
't',
'm',
'l',
'.',
'd',
'l',
'l',
88 '/',
'b',
'l',
'a',
'n',
'k',
'.',
'h',
't',
'm',0};
89static const WCHAR url2[] = {
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
90static const WCHAR url3[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'c',
':',
'\\',
'I',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
91static const WCHAR url4[] = {
'f',
'i',
'l',
'e',
':',
's',
'o',
'm',
'e',
'%',
'2',
'0',
'f',
'i',
'l',
'e',
92 '%',
'2',
'e',
'j',
'p',
'g',0};
93static const WCHAR url5[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
94 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
95static const WCHAR url6[] = {
'a',
'b',
'o',
'u',
't',
':',
'b',
'l',
'a',
'n',
'k',0};
96static const WCHAR url7[] = {
'f',
't',
'p',
':',
'/',
'/',
'z',
'o',
'n',
'e',
'3',
97 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'/',
'f',
'i',
'l',
'e',
'.',
't',
'e',
's',
't',0};
98static const WCHAR url8[] = {
't',
'e',
's',
't',
':',
'1',
'2',
'3',
'a',
'b',
'c',0};
99static const WCHAR url9[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
100 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'/',
's',
'i',
't',
'e',
'/',
'a',
'b',
'o',
'u',
't',0};
101static const WCHAR url10[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
's',
'o',
'm',
'e',
'%',
'2',
'0',
'f',
'i',
'l',
'e',
103static const WCHAR url11[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'c',
':',
'/',
'I',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
104static const WCHAR url12[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'c',
':',
'/',
'I',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',0};
105static const WCHAR url13[] = {
'h',
't',
't',
'p',
':',
'g',
'o',
'o',
'g',
'l',
'e',
'.',
'c',
'o',
'm',0};
106static const WCHAR url14[] = {
'z',
'i',
'p',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',0};
107static const WCHAR url15[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'g',
'o',
'o',
'g',
'l',
'e',
'.',
'c',
'o',
'm',
'.',
'u',
'k',0};
108static const WCHAR url16[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'c',
':',0};
109static const WCHAR url17[] = {
'f',
'i',
'l',
'e',
':',
'/',
'/',
'/',
'c',
':',
'c',
'\\',0};
110static const WCHAR url18[] = {
'c',
':',
'\\',
't',
'e',
's',
't',
'.',
'h',
't',
'm',0};
113static const WCHAR security_urlW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
't',
'e',
's',
't',
'i',
'n',
'g',0};
114static const WCHAR security_url2W[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'2',0};
115static const WCHAR security_expectedW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
'z',
'i',
'p',0};
116static const WCHAR winetest_to_httpW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
':',
'h',0};
118static const char *
szZoneMapDomainsKey =
"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains";
122static const BYTE secid2[] = {
'*',
':',
'i',
'n',
'd',
'e',
'x',
'.',
'h',
't',
'm',3,0,0,0};
123static const BYTE secid5[] = {
'h',
't',
't',
'p',
':',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
124 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',3,0,0,0};
125static const BYTE secid6[] = {
'a',
'b',
'o',
'u',
't',
':',
'b',
'l',
'a',
'n',
'k',3,0,0,0};
126static const BYTE secid7[] = {
'f',
't',
'p',
':',
'z',
'o',
'n',
'e',
'3',
127 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',3,0,0,0};
129 {
'f',
'i',
'l',
'e',
':',
's',
'o',
'm',
'e',
'%',
'2',
'0',
'f',
'i',
'l',
'e',
'.',
'j',
'p',
'g',3,0,0,0};
131 {
'z',
'i',
'p',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',3,0,0,0};
133 {
'f',
'i',
'l',
'e',
':',
's',
'o',
'm',
'e',
' ',
'f',
'i',
'l',
'e',
'.',
'j',
'p',
'g',3,0,0,0};
134static const BYTE secid13[] = {
'h',
't',
't',
'p',
':',
'c',
'o',
'm',
'.',
'u',
'k',3,0,0,0};
135static const BYTE secid13_2[] = {
'h',
't',
't',
'p',
':',
'g',
'o',
'o',
'g',
'l',
'e',
'.',
'c',
'o',
'm',
'.',
'u',
'k',3,0,0,0};
138 {0x178fc163,0xf585,0x4e24,{0x9c,0x13,0x4b,0xb7,0xfa,0xf8,0x06,0x46}};
142 {0x10200490,0xfa38,0x11d0,{0xac,0x0e,0x00,0xa0,0xc9,0xf,0xff,0xc0}};
173 if(len1!=len2)
return 1;
202 DWORD dwMaxSubkeyLen, dwMaxValueLen;
220 dwMaxLen =
max(dwMaxSubkeyLen, dwMaxValueLen);
257 if (lpszName != szNameBuf)
267 ok(0,
"unexpected call\n");
284 ok(0,
"unexpected call\n");
291 ok(0,
"unexpected call\n");
298 ok(0,
"unexpected call\n");
305 ok(0,
"unexpected call\n");
314 ok(dwAction == URLACTION_FEATURE_ZONE_ELEVATION,
"dwAction = %x\n", dwAction);
315 ok(cbPolicy ==
sizeof(
DWORD),
"cbPolicy = %d\n", cbPolicy);
316 ok(!pContext,
"pContext != NULL\n");
328 ok(0,
"unexpected call\n");
335 ok(0,
"unexpected call\n");
342 ok(0,
"unexpected call\n");
370 if(!pCoInternetCreateSecurityManager) {
374 trace(
"Testing security manager...\n");
376 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
377 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08x\n",
hres);
387 "[%d] MapUrlToZone failed: %08x, expected %08x\n",
400 "[%d] GetSecurityId failed: %08x, expected %08x\n",
410 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
url10, &
zone, 0);
411 ok(
hres ==
S_OK,
"MapUrlToZone failed: %08x, expected S_OK\n",
hres);
417 hres = IInternetSecurityManager_GetSecurityId(secmgr,
url10,
buf, &
size, 0);
418 ok(
hres ==
S_OK,
"GetSecurityId failed: %08x, expected S_OK\n",
hres);
427 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
url13, &
zone, 0);
433 hres = IInternetSecurityManager_GetSecurityId(secmgr,
url13,
buf, &
size, 0);
437 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
url14, &
zone, 0);
438 ok(
hres ==
S_OK,
"MapUrlToZone failed: %08x, expected S_OK\n",
hres);
439 ok(
zone == URLZONE_INTERNET,
"zone=%d\n",
zone);
443 hres = IInternetSecurityManager_GetSecurityId(secmgr,
url14,
buf, &
size, 0);
444 ok(
hres ==
S_OK,
"GetSecurityId failed: %08x, expected S_OK\n",
hres);
449 hres = IInternetSecurityManager_MapUrlToZone(secmgr,
NULL, &
zone, 0);
454 hres = IInternetSecurityManager_GetSecurityId(secmgr,
NULL,
buf, &
size, 0);
456 "GetSecurityId failed: %08x, expected E_INVALIDARG\n",
hres);
460 "GetSecurityId failed: %08x, expected E_INVALIDARG\n",
hres);
464 "GetSecurityId failed: %08x, expected E_INVALIDARG\n",
hres);
466 hres = IInternetSecurityManager_ProcessUrlAction(secmgr,
NULL, URLACTION_SCRIPT_RUN, (
BYTE*)&
policy,
470 IInternetSecurityManager_Release(secmgr);
491 return ie_harden != 0;
505 "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey);
518 "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey);
531 "(0x%x) got 0x%x (expected E_FAIL)\n",
action,
hres);
536 sizeof(
DWORD), URLZONEREG_DEFAULT);
538 "(0x%x) got 0x%x (expected E_FAIL)\n",
action,
hres);
545 sizeof(
DWORD), URLZONEREG_DEFAULT);
549 if(
policy != URLPOLICY_QUERY) {
556 if(reg_policy == URLPOLICY_DISALLOW)
565 if(reg_policy == URLPOLICY_DISALLOW)
574 if(reg_policy == URLPOLICY_DISALLOW)
582 sizeof(
WCHAR), (
BYTE*)0xdeadbeef, 16, 0, 0);
583 if(reg_policy == URLPOLICY_DISALLOW)
590 if(expect_parse_call)
594 if(expect_parse_call)
596 if(reg_policy == URLPOLICY_DISALLOW)
602 skip(
"IE running in Enhanced Security Configuration\n");
614 sizeof(
DWORD), URLZONEREG_DEFAULT);
616 ok(
policy == URLPOLICY_DISALLOW,
"(%x) policy=%x, expected URLPOLICY_DISALLOW\n",
action,
policy);
638 hres = IInternetSecurityManager_ProcessUrlAction(secmgr,
url1, URLACTION_ACTIVEX_RUN, (
BYTE*)&
policy,
640 ok(
hres ==
S_OK,
"ProcessUrlAction(URLACTION_ACTIVEX_RUN) failed: %08x\n",
hres);
647 &ppolicy, &policy_size, (
BYTE*)&
cs,
sizeof(
cs), 0);
657 trace(
"testing polices...\n");
659 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
660 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08x\n",
hres);
661 hres = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
662 ok(
hres ==
S_OK,
"CoInternetCreateZoneManager failed: %08x\n",
hres);
666 test_url_action(secmgr, zonemgr, URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY);
667 test_url_action(secmgr, zonemgr, URLACTION_CHANNEL_SOFTDIST_PERMISSIONS);
675 IInternetSecurityManager_Release(secmgr);
676 IInternetZoneManager_Release(zonemgr);
690 static const WCHAR testing_domain_urlW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
691 'd',
'o',
'm',
'a',
'i',
'n',
'/',0};
711 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
712 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08x\n",
hres);
714 zone = URLZONE_INVALID;
715 hres = IInternetSecurityManager_MapUrlToZone(secmgr, testing_domain_urlW, &
zone, 0);
724 IInternetSecurityManager_Release(secmgr);
769 skip(
"need admin rights\n");
793 if(!
test->subdomain) {
837 if(
test->subdomain) {
884 {
"zip://yabadaba.do/",URLZONE_INTERNET},
886 {
"ftp://testing.google.super.cool/",URLZONE_INTERNET},
894 {
"test://www.tests.test/",URLZONE_INTERNET},
895 {
"test://tests.test/",URLZONE_INTERNET},
896 {
"zip://www.tests.test/",URLZONE_INTERNET},
897 {
"zip://tests.test/",URLZONE_INTERNET},
899 {
"http://google.www.testing.com/",URLZONE_INTERNET},
919 trace(
"testing zone domain mappings...\n");
921 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
922 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08x\n",
hres);
926 static const WCHAR local_machineW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'.',
'l',
'o',
'c',
'a',
'l',
927 '.',
'm',
'a',
'c',
'h',
'i',
'n',
'e',
'/',0};
929 hres = IInternetSecurityManager_MapUrlToZone(secmgr, local_machineW, &
zone, 0);
939 zone = URLZONE_INVALID;
941 hres = IInternetSecurityManager_MapUrlToZone(secmgr, urlW, &
zone, 0);
945 "Expected %d, but got %d on test %d\n",
test->zone,
zone,
i);
950 IInternetSecurityManager_Release(secmgr);
956 skip(
"IE running in Enhanced Security Configuration\n");
958 }
else if(!pCreateUri) {
959 win_skip(
"Skipping zone domain tests, IE too old\n");
963 trace(
"testing zone domains...\n");
978 trace(
"simple zone manager tests...\n");
980 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
981 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%x\n",
hr);
985 hr = IInternetZoneManager_QueryInterface(zonemgr, &
IID_IUnknown, (
void **) &punk);
988 IUnknown_Release(punk);
990 hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManager, (
void **) &punk);
993 IUnknown_Release(punk);
996 hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx, (
void **) &punk);
998 IUnknown_Release(punk);
1000 hr = IInternetZoneManager_QueryInterface(zonemgr, &IID_IInternetZoneManagerEx2, (
void **) &punk);
1002 "got 0x%x (expected S_OK)\n",
hr);
1004 IUnknown_Release(punk);
1006 win_skip(
"InternetZoneManagerEx2 not supported\n");
1010 win_skip(
"InternetZoneManagerEx not supported\n");
1012 hr = IInternetZoneManager_Release(zonemgr);
1013 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1026 trace(
"testing zone enumerator...\n");
1028 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1029 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%x\n",
hr);
1034 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum,
NULL, 0);
1036 "got 0x%x with 0x%x (expected E_INVALIDARG with 0xdeadbeef)\n",
hr, dwEnum);
1039 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr,
NULL, &dwCount, 0);
1041 "got 0x%x and 0x%x (expected E_INVALIDARG and 0xdeadbeef)\n",
hr, dwCount);
1045 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0xffffffff);
1046 ok((
hr ==
E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef),
1047 "got 0x%x with 0x%x and 0x%x (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n",
1048 hr, dwEnum, dwCount);
1052 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 1);
1053 ok((
hr ==
E_INVALIDARG) && (dwEnum == 0xdeadbeef) && (dwCount == 0xdeadbeef),
1054 "got 0x%x with 0x%x and 0x%x (expected E_INVALIDARG with 0xdeadbeef and 0xdeadbeef)\n",
1055 hr, dwEnum, dwCount);
1060 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0);
1061 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1065 dwCount2=0xdeadbeef;
1066 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum2, &dwCount2, 0);
1067 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1070 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum2);
1071 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1074 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum);
1075 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1078 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum);
1083 hr = IInternetZoneManager_Release(zonemgr);
1084 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1094 trace(
"testing GetZoneActionPolixy...\n");
1096 hres = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1097 ok(
hres ==
S_OK,
"CoInternetCreateZoneManager failed: %08x\n",
hres);
1101 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3,
action,
buf,
1102 sizeof(
DWORD), URLZONEREG_DEFAULT);
1104 ok(*(
DWORD*)
buf == URLPOLICY_CREDENTIALS_SILENT_LOGON_OK ||
1105 *(
DWORD*)
buf == URLPOLICY_CREDENTIALS_MUST_PROMPT_USER ||
1106 *(
DWORD*)
buf == URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT ||
1107 *(
DWORD*)
buf == URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY,
1108 "unexpected policy=%d\n", *(
DWORD*)
buf);
1110 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3,
action,
NULL,
1111 sizeof(
DWORD), URLZONEREG_DEFAULT);
1114 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3,
action,
buf,
1115 2, URLZONEREG_DEFAULT);
1118 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 3, 0x1fff,
buf,
1119 sizeof(
DWORD), URLZONEREG_DEFAULT);
1121 "(0x%x) got 0x%x (expected E_FAIL)\n",
action,
hres);
1123 hres = IInternetZoneManager_GetZoneActionPolicy(zonemgr, 13,
action,
buf,
1124 sizeof(
DWORD), URLZONEREG_DEFAULT);
1127 IInternetZoneManager_Release(zonemgr);
1139 trace(
"testing GetZoneAt...\n");
1141 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1142 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%x\n",
hr);
1146 hr = IInternetZoneManager_CreateZoneEnumerator(zonemgr, &dwEnum, &dwCount, 0);
1152 IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, 0,
NULL);
1155 dwZone = 0xdeadbeef;
1156 hr = IInternetZoneManager_GetZoneAt(zonemgr, 0xdeadbeef, 0, &dwZone);
1158 "got 0x%x with 0x%x (expected E_INVALIDARG)\n",
hr, dwZone);
1160 for (
i = 0;
i < dwCount;
i++)
1162 dwZone = 0xdeadbeef;
1163 hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum,
i, &dwZone);
1164 ok(
hr ==
S_OK,
"#%d: got x%x with %d (expected S_OK)\n",
i,
hr, dwZone);
1167 dwZone = 0xdeadbeef;
1169 hr = IInternetZoneManager_GetZoneAt(zonemgr, dwEnum, dwCount, &dwZone);
1171 "got 0x%x with 0x%x (expected E_INVALIDARG)\n",
hr, dwZone);
1173 hr = IInternetZoneManager_DestroyZoneEnumerator(zonemgr, dwEnum);
1174 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1177 hr = IInternetZoneManager_Release(zonemgr);
1178 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1185 ZONEATTRIBUTES* pZA = (ZONEATTRIBUTES*)
buffer;
1189 trace(
"testing GetZoneAttributes...\n");
1191 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1192 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%x\n",
hr);
1197 for (
i = 0;
i < 5;
i++) {
1199 hr = IInternetZoneManager_GetZoneAttributes(zonemgr,
i, pZA);
1200 ok(
hr ==
S_OK,
"#%d: got 0x%x (expected S_OK)\n",
i,
hr);
1206 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA);
1207 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1208 ok((pZA->cbSize == 0) || (pZA->cbSize ==
sizeof(ZONEATTRIBUTES)),
1209 "got cbSize = %d (expected 0)\n", pZA->cbSize);
1213 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA);
1214 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1215 ok((pZA->cbSize == 64) || (pZA->cbSize ==
sizeof(ZONEATTRIBUTES)),
1216 "got cbSize = %d (expected 64)\n", pZA->cbSize);
1219 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, pZA);
1220 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1221 ok((pZA->cbSize == 0xffffffff) || (pZA->cbSize ==
sizeof(ZONEATTRIBUTES)),
1222 "got cbSize = 0x%x (expected 0xffffffff)\n", pZA->cbSize);
1226 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0xdeadbeef, pZA);
1228 "got 0x%x (expected S_OK or E_FAIL)\n",
hr);
1230 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0,
NULL);
1233 hr = IInternetZoneManager_Release(zonemgr);
1234 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1241 ZONEATTRIBUTES* pZA = (ZONEATTRIBUTES*)
buffer;
1247 trace(
"testing SetZoneAttributes...\n");
1248 hr = pCoInternetCreateZoneManager(
NULL, &zonemgr, 0);
1249 ok(
hr ==
S_OK,
"CoInternetCreateZoneManager result: 0x%x\n",
hr);
1254 hr = IInternetZoneManager_GetZoneAttributes(zonemgr, URLZONE_LOCAL_MACHINE, pZA);
1255 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1265 pZA->cbSize =
sizeof(ZONEATTRIBUTES);
1272 win_skip(
"SetZoneAttributes not supported: IE too old\n");
1275 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1278 pZA->cbSize =
sizeof(ZONEATTRIBUTES) +
sizeof(
DWORD);
1280 ok(
hr ==
S_OK,
"got 0x%x for sizeof(ZONEATTRIBUTES) + sizeof(DWORD) (expected S_OK)\n",
hr);
1282 pZA->cbSize =
sizeof(ZONEATTRIBUTES) -
sizeof(
DWORD);
1284 ok(
hr ==
S_OK,
"got 0x%x for sizeof(ZONEATTRIBUTES) - sizeof(DWORD) (expected S_OK)\n",
hr);
1288 ok(
hr ==
S_OK,
"got 0x%x for size 0 (expected S_OK)\n",
hr);
1301 "got %u with %p (expected ERROR_FILE_NOT_FOUND with NULL)\n",
res, hkey);
1309 hr = IInternetZoneManager_Release(zonemgr);
1310 ok(
hr ==
S_OK,
"got 0x%x (expected S_OK)\n",
hr);
1321 trace(
"testing marshalling...\n");
1323 hres = pCoInternetCreateSecurityManager(
NULL, &secmgr, 0);
1324 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08x\n",
hres);
1328 hres = IInternetSecurityManager_QueryInterface(secmgr, &
IID_IUnknown, (
void**)&unk);
1332 ok(
hres ==
S_OK,
"CreateStreamOnHGlobal returned: %08x\n",
hres);
1337 "CoMarshalInterface returned: %08x\n",
hres);
1340 IUnknown_Release(unk);
1341 IInternetSecurityManager_Release(secmgr);
1346 const WCHAR url5_out[] = {
'h',
't',
't',
'p',
':',
'w',
'w',
'w',
'.',
'z',
'o',
'n',
'e',
'3',
1347 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
1348 const WCHAR url7_out[] = {
'f',
't',
'p',
':',
'z',
'o',
'n',
'e',
'3',
'.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0};
1358 trace(
"testing CoInternetGetSecurityUrl...\n");
1361 hres = pCoInternetGetSecurityUrl(
in[
i], &sec, PSU_DEFAULT, 0);
1362 ok(
hres ==
S_OK,
"(%d) CoInternetGetSecurityUrl returned: %08x\n",
i,
hres);
1364 ok(!
strcmp_w(sec, out_default[
i]),
"(%d) Got %s, expected %s\n",
1369 hres = pCoInternetGetSecurityUrl(
in[
i], &sec, PSU_SECURITY_URL_ONLY, 0);
1370 ok(
hres ==
S_OK,
"(%d) CoInternetGetSecurityUrl returned: %08x\n",
i,
hres);
1372 ok(!
strcmp_w(sec, out_securl[
i]),
"(%d) Got %s, expected %s\n",
1380 SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected);
1383 ok(
hres ==
S_OK,
"CoInternetGetSecurityUrl returned 0x%08x, expected S_OK\n",
hres);
1397 ok(0,
"unexpected call\n");
1417 ok(pwzResult !=
NULL,
"pwzResult == NULL\n");
1418 ok(pcchResult !=
NULL,
"pcchResult == NULL\n");
1419 ok(!dwParseFlags,
"Expected 0, but got 0x%08x\n", dwParseFlags);
1421 switch(ParseAction) {
1422 case PARSE_SECURITY_URL:
1425 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %d\n", cchResult);
1429 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %d\n", cchResult);
1433 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %d\n", cchResult);
1438 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %d\n", cchResult);
1452 case PARSE_SECURITY_DOMAIN:
1458 ok(cchResult ==
lstrlenW(pwzUrl)+1,
"Got %d\n", cchResult);
1462 ok(0,
"Unexpected call, ParseAction=%d pwzUrl=%s\n", ParseAction,
1470 if(*pcchResult > cchResult)
1480 ok(0,
"unexpected call\n");
1487 ok(0,
"unexpected call\n");
1495 ok(0,
"unexpected call\n");
1518 ok(0,
"unexpected call\n");
1535 ok(0,
"unexpected call\n");
1541 ok(0,
"unexpected call\n");
1569 IInternetSession_Release(
session);
1576 hr = pCoInternetGetSession(0, &
session, 0);
1577 ok(
hr ==
S_OK,
"CoInternetGetSession failed: 0x%08x\n",
hr);
1582 ok(
hr ==
S_OK,
"UnregisterNameSpace failed: 0x%08x\n",
hr);
1584 IInternetSession_Release(
session);
1587static const struct {
1596 {
"index.htm",Uri_CREATE_ALLOW_RELATIVE,
"*:index.html",
S_OK,
"*:index.htm",
S_OK},
1597 {
"file://c:\\Index.htm",Uri_CREATE_FILE_USE_DOS_PATH,
"file:///c:/Index.htm",
S_OK,
"file:///c:/Index.htm",
S_OK},
1600 {
"http://www.zone3.winetest/",0,
"http://www.zone3.winetest/",
S_OK,
"http://www.zone3.winetest/",
S_OK},
1601 {
"about:blank",0,
"about:blank",
S_OK,
"about:blank",
S_OK},
1602 {
"ftp://zone3.winetest/file.test",0,
"ftp://zone3.winetest/file.test",
S_OK,
"ftp://zone3.winetest/file.test",
S_OK},
1603 {
"test:123abc",0,
"test:123abc",
S_OK,
"test:123abc",
S_OK},
1604 {
"http:google.com/test.file",0,
"http:google.com/test.file",
S_OK,
"http:google.com/test.file",
S_OK},
1605 {
"ftp://test@ftp.winehq.org/",0,
"ftp://ftp.winehq.org/",
S_OK,
"ftp://ftp.winehq.org/",
S_OK},
1606 {
"test://google@ftp.winehq.org/",0,
"test://google@ftp.winehq.org/",
S_OK,
"test://google@ftp.winehq.org/",
S_OK}
1615 trace(
"testing CoInternetGetSecurityUrlEx...\n");
1617 hr = pCoInternetGetSecurityUrlEx(
NULL,
NULL, PSU_DEFAULT, 0);
1618 ok(
hr ==
E_INVALIDARG,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected E_INVALIDARG\n",
hr);
1620 result = (
void*) 0xdeadbeef;
1621 hr = pCoInternetGetSecurityUrlEx(
NULL, &
result, PSU_DEFAULT, 0);
1622 ok(
hr ==
E_INVALIDARG,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected E_INVALIDARG\n",
hr);
1630 ok(
hr ==
S_OK,
"CreateUri returned 0x%08x on test %d\n",
hr,
i);
1634 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_DEFAULT, 0);
1637 "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n",
1644 ok(
hr ==
S_OK,
"GetDisplayUri returned 0x%08x on test %d\n",
hr,
i);
1657 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_SECURITY_URL_ONLY, 0);
1660 "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n",
1667 ok(
hr ==
S_OK,
"GetDisplayUri returned 0x%08x on test %d\n",
hr,
i);
1680 if(
uri) IUri_Release(
uri);
1690 trace(
"testing CoInternetGetSecurityUrlEx for pluggable protocols...\n");
1693 ok(
hr ==
S_OK,
"CreateUri returned 0x%08x\n",
hr);
1697 SET_EXPECT(ParseUrl_SECURITY_DOMAIN_expected);
1699 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_DEFAULT, 0);
1700 ok(
hr ==
S_OK,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected S_OK\n",
hr);
1710 ok(
hr ==
S_OK,
"GetAbsoluteUri returned 0x%08x\n",
hr);
1724 hr = pCoInternetGetSecurityUrlEx(
uri, &
result, PSU_SECURITY_URL_ONLY, 0);
1725 ok(
hr ==
S_OK,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected S_OK\n",
hr);
1734 ok(
hr ==
S_OK,
"GetAbsoluteUri returned 0x%08x\n",
hr);
1743 if(
uri) IUri_Release(
uri);
1746static const BYTE secidex2_1[] = {
'z',
'i',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',
'/',3,0,0,0};
1747static const BYTE secidex2_2[] = {
'z',
'i',
'p',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',3,0,0,0};
1748static const BYTE secidex2_3[] = {
'*',
':',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'c',
'o',
'm',3,0,0,0};
1750static const struct {
1786 static const WCHAR domainW[] = {
'c',
'o',
'm',
'.',
'u',
'k',0};
1789 win_skip(
"Skipping SecurityManagerEx2, IE is too old\n");
1793 trace(
"Testing SecurityManagerEx2...\n");
1795 hres = pCoInternetCreateSecurityManager(
NULL, &sec_mgr, 0);
1796 ok(
hres ==
S_OK,
"CoInternetCreateSecurityManager failed: %08x\n",
hres);
1798 hres = IInternetSecurityManager_QueryInterface(sec_mgr, &IID_IInternetSecurityManagerEx2, (
void**)&sec_mgr2);
1799 ok(
hres ==
S_OK,
"QueryInterface(IID_IInternetSecurityManagerEx2) failed: %08x\n",
hres);
1805 ok(
zone == URLZONE_INVALID,
"zone was %d\n",
zone);
1807 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
NULL,
buf, &buf_size, 0);
1809 ok(buf_size ==
sizeof(
buf),
"buf_size was %d\n", buf_size);
1817 buf_size =
sizeof(
buf);
1818 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
NULL, &buf_size, 0);
1820 ok(buf_size ==
sizeof(
buf),
"bug_size was %d\n", buf_size);
1822 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf,
NULL, 0);
1831 zone = URLZONE_INVALID;
1844 buf_size =
sizeof(
buf);
1847 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf, &buf_size, 0);
1866 buf_size =
sizeof(
buf);
1869 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf, &buf_size, (
DWORD_PTR)domainW);
1874 buf_size =
sizeof(
buf);
1877 hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2,
uri,
buf, &buf_size, 0);
1879 ok(buf_size ==
sizeof(
secid13_2),
"buf_size was %d\n", buf_size);
1884 IInternetSecurityManagerEx2_Release(sec_mgr2);
1885 IInternetSecurityManager_Release(sec_mgr);
1891 const char *url_from;
1897 {
"http://www.winehq.org",
"http://www.winehq.org", 0,
S_FALSE, URLPOLICY_ALLOW },
1898 {
"http://www.winehq.org",
"http://www.winehq.org", 0,
S_OK, URLPOLICY_DISALLOW },
1899 {
"http://www.winehq.org",
"http://www.codeweavers.com", 0,
S_FALSE, URLPOLICY_ALLOW },
1900 {
"http://www.winehq.org",
"http://www.codeweavers.com", 0,
S_OK, URLPOLICY_DISALLOW },
1901 {
"http://www.winehq.org",
"http://www.winehq.org", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1902 {
"http://www.winehq.org",
"http://www.winehq.org/dir", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1903 {
"http://www.winehq.org",
"http://www.codeweavers.com", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1904 {
"http://www.winehq.org",
"ftp://winehq.org", GET_FEATURE_FROM_PROCESS,
S_FALSE, -1 },
1905 {
"http://www.winehq.org",
"ftp://winehq.org", GET_FEATURE_FROM_PROCESS|0x100,
S_FALSE, URLPOLICY_ALLOW },
1906 {
"http://www.winehq.org",
"ftp://winehq.org", GET_FEATURE_FROM_REGISTRY,
S_FALSE, URLPOLICY_ALLOW },
1909 WCHAR *url_from, *url_to;
1913 if(!pCoInternetIsFeatureZoneElevationEnabled || !pCoInternetIsFeatureEnabled
1914 || !pCoInternetIsFeatureEnabledForUrl) {
1915 win_skip(
"Skipping CoInternetIsFeatureZoneElevationEnabled tests\n");
1923 trace(
"Testing CoInternetIsFeatureZoneElevationEnabled... (%x)\n",
hres);
1927 testcases[
i].policy_flags = URLPOLICY_ALLOW;
1933 i = called_ProcessUrlAction;
1936 skip(
"CoInternetIsFeatureZoneElevationEnabled does not use passed ISecurityManager\n");
1941 url_from =
a2w(testcases[
i].url_from);
1942 url_to =
a2w(testcases[
i].url_to);
1944 if(testcases[
i].policy_flags != -1) {
1948 hres = pCoInternetIsFeatureZoneElevationEnabled(url_from, url_to,
1950 ok(
hres == testcases[
i].
hres,
"%d) CoInternetIsFeatureZoneElevationEnabled returned %x\n",
i,
hres);
1951 if(testcases[
i].policy_flags != -1)
1954 if(testcases[
i].policy_flags != -1)
1958 ok(
hres == testcases[
i].
hres,
"%d) CoInternetIsFeatureEnabledForUrl returned %x\n",
i,
hres);
1959 if(testcases[
i].policy_flags != -1)
1974 pCoInternetCreateSecurityManager = (
void*)
GetProcAddress(hurlmon,
"CoInternetCreateSecurityManager");
1975 pCoInternetCreateZoneManager = (
void*)
GetProcAddress(hurlmon,
"CoInternetCreateZoneManager");
1976 pCoInternetGetSecurityUrl = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSecurityUrl");
1977 pCoInternetGetSecurityUrlEx = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSecurityUrlEx");
1979 pCoInternetGetSession = (
void*)
GetProcAddress(hurlmon,
"CoInternetGetSession");
1980 pCoInternetIsFeatureEnabled = (
void*)
GetProcAddress(hurlmon,
"CoInternetIsFeatureEnabled");
1981 pCoInternetIsFeatureEnabledForUrl = (
void*)
GetProcAddress(hurlmon,
"CoInternetIsFeatureEnabledForUrl");
1982 pCoInternetIsFeatureZoneElevationEnabled = (
void*)
GetProcAddress(hurlmon,
"CoInternetIsFeatureZoneElevationEnabled");
1984 if (!pCoInternetCreateSecurityManager || !pCoInternetCreateZoneManager ||
1985 !pCoInternetGetSecurityUrl) {
1986 win_skip(
"Various CoInternet* functions not present in IE 4.0\n");
2001 if(!pCoInternetGetSecurityUrlEx || !pCreateUri)
2002 win_skip(
"Skipping CoInternetGetSecurityUrlEx tests, IE too old\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
static BOOL heap_free(void *mem)
#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)
#define GetProcAddress(x, y)
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define sprintf(buf, format,...)
#define todo_wine_if(is_todo)
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 const struct @1729 sec_url_ex_tests[]
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 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)
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 LPWSTR a2w(LPCSTR str)
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 void test_zone_domains(void)
static const BYTE secidex2_2[]
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
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 struct @1730 sec_mgr_ex2_tests[]
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
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualGUID(rguid1, rguid2)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define REGDB_E_IIDNOTREG
#define HRESULT_FROM_WIN32(x)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)