61 url =
"http://swupmf.adobe.com/manifest/50/win/AdobeUpdater.upd";
70 "got %u and %u with size %u for '%s' (%d)\n",
82 "got %u and %u with size %u for '%s' (%d)\n",
93 "got %u and %u with size %u for '%s' (%d)\n",
103 ok(!
lstrcmpA(
"file://C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml",
buffer),
104 "got %s expected 'file://C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml'\n",
buffer);
114 "got %u and %u with size %u for '%s' (%d)\n",
120 buffer[urllen + 4] =
'\0';
125 "got %u and %u with size %u for '%s' (%d)\n",
129 buffer[urllen + 4] =
'\0';
134 "got %u and %u with size %u for '%s' (%d)\n",
138 buffer[urllen + 4] =
'\0';
143 "got %u and %u with size %u for '%s' (%d)\n",
149 ok(
res == 1,
"InternetCanonicalizeUrlA failed\n");
150 ok(!
strcmp(
buffer,
"http://www.winehq.org/index.php?x="),
"Trailing space should have been stripped even in ICU_BROWSER_MODE (%s)\n",
buffer);
153 ok(!
res,
"InternetSetOptionA succeeded\n");
155 "InternetSetOptionA failed %u, expected ERROR_INTERNET_INVALID_OPTION\n",
GetLastError());
165 static const char useragent[] = {
"Wininet Test"};
177 ok((hinet != 0x0),
"InternetOpen Failed\n");
182 ok(retval == 0,
"Got wrong return value %d\n",retval);
190 ok(retval == 0,
"Got wrong return value %d\n",retval);
196 ok(retval == 1,
"Got wrong return value %d\n",retval);
199 ok(!
strcmp(useragent,
buffer),
"Got wrong user agent string %s instead of %s\n",
buffer,useragent);
209 ok(
len ==
strlen(useragent) + 1,
"Got wrong user agent length %d instead of %d\n",
len,
lstrlenA(useragent) + 1);
210 ok(!retval,
"Got wrong return value %d\n", retval);
220 ok(
len == 0,
"Got wrong user agent length %d instead of 0\n",
len);
221 ok(retval == 0,
"Got wrong return value %d\n",retval);
228 ok(retval == 0,
"Got wrong return value %d\n",retval);
236 ok(retval == 0,
"Got wrong return value %d\n",retval);
244 ok((hinet != 0x0),
"InternetOpen Failed\n");
250 ok(
len == 1,
"Got wrong user agent length %d instead of %d\n",
len,1);
251 ok(retval == 0,
"Got wrong return value %d\n",retval);
258 ok(
res,
"InternetSetOptionA(INTERNET_OPTION_CONNECT_TIMEOUT) failed (%u)\n",
GetLastError());
263 ok(
val == 12345,
"val = %d\n",
val);
267 ok((hinet != 0x0),
"InternetOpen Failed\n");
272 ok(
len == 1,
"Got wrong user agent length %d instead of %d\n",
len,1);
273 ok(retval == 0,
"Got wrong return value %d\n",retval);
279 ok(!
res,
"InternetQueryOptionA(INTERNET_OPTION_MAX_CONNS_PER_SERVER) succeeded\n");
284 ok(!
res,
"InternetSetOptionA(INTERNET_OPTION_MAX_CONNS_PER_SERVER) succeeded\n");
290 ok(
val == 12345,
"val = %d\n",
val);
295 ok(
res,
"InternetSetOptionA(INTERNET_OPTION_CONNECT_TIMEOUT) failed (%u)\n",
GetLastError());
306 ok(
val == 12345,
"val = %d\n",
val);
320 ok(
res,
"Got wrong return value %x\n",
res);
322 trace(
"INTERNET_OPTION_MAX_CONNS_PER_SERVER: %d\n",
val);
327 ok(
res,
"Got wrong return value %x\n",
res);
329 trace(
"INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER: %d\n",
val);
333 ok(
res,
"InternetSetOptionA(INTERNET_OPTION_MAX_CONNS_PER_SERVER) failed: %x\n",
res);
338 ok(
res,
"Got wrong return value %x\n",
res);
345 "InternetSetOptionA(INTERNET_OPTION_MAX_CONNS_PER_SERVER, 0) succeeded\n");
350 ok(!
res,
"InternetSetOptionA(INTERNET_OPTION_MAX_CONNS_PER_SERVER) succeeded\n");
355 ok(!
res,
"InternetSetOptionA(INTERNET_OPTION_MAX_CONNS_PER_SERVER) succeeded\n");
368 "InternetGetCookie should have failed with %s and error %d\n",
382 static const WCHAR testing_example_comW[] =
383 {
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'e',
's',
't',
'i',
'n',
'g',
'.',
'e',
'x',
'a',
'm',
'p',
'l',
'e',
'.',
'c',
'o',
'm',0};
386 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
388 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
392 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
394 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
396 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
398 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
400 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
402 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
406 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
412 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
428 "InternetGetCookie returned: %x(%u), expected ERROR_INSUFFICIENT_BUFFER\n",
ret,
GetLastError());
433 ok(
ret ==
TRUE,
"InternetGetCookieW failed\n");
437 memset(wbuf, 0xac,
sizeof(wbuf));
439 ok(
ret ==
TRUE,
"InternetGetCookieW failed\n");
444 memset(wbuf, 0xac,
sizeof(wbuf));
447 "InternetGetCookieW returned: %x(%u), expected ERROR_INSUFFICIENT_BUFFER\n",
ret,
GetLastError());
452 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
464 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
476 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
488 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
500 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
512 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
526 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
540 ok(
len == 29,
"got len %u.\n",
len);
555 ok(!
ret,
"InternetSetCookie succeeded\n");
570 win_skip(
"Skipping cookie attributes tests. Too old IE.\n");
620 char long_url[5000] =
"http://long.url.test.com/", *
p;
626 static const WCHAR about_blankW[] = {
'a',
'b',
'o',
'u',
't',
':',
'b',
'l',
'a',
'n',
'k',0};
631 "InternetGetCookeA failed: %u, expected ERROR_INVALID_PARAMETER\n",
GetLastError());
636 "InternetGetCookeW failed: %u, expected ERROR_INVALID_PARAMETER\n",
GetLastError());
641 "InternetGetCookeExA failed: %u, expected ERROR_INVALID_PARAMETER\n",
GetLastError());
646 "InternetGetCookeExW failed: %u, expected ERROR_INVALID_PARAMETER\n",
GetLastError());
648 p = long_url +
strlen(long_url);
649 memset(
p,
'x', long_url+
sizeof(long_url)-
p);
650 p += (long_url+
sizeof(long_url)-
p) - 3;
669 static const WCHAR szServer[] = {
's',
'e',
'r',
'v',
'e',
'r',0 };
670 static const WCHAR szServer2[] = {
's',
'e',
'r',
'v',
'e',
'r',
'=',0 };
672 static const WCHAR szUrl[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'a',
'.',
'b',
'.',
'c',0 };
673 static const WCHAR szUrlEmpty[] = {
'h',
't',
't',
'p',
':',
'/',
'/',0 };
674 static const WCHAR szExpect[] = {
's',
'e',
'r',
'v',
'e',
'r',
';',
' ',
's',
'e',
'r',
'v',
'e',
'r',0 };
683 win_skip(
"Internet*W functions are not implemented\n");
686 ok(hi !=
NULL,
"open failed\n");
690 ok(hc ==
NULL,
"connect failed\n");
694 ok(hc ==
NULL,
"connect failed\n");
698 ok(hc ==
NULL,
"connect failed\n");
702 ok(hc ==
NULL,
"connect failed\n");
707 ok(hc ==
NULL,
"connect failed\n");
711 ok(hc ==
NULL,
"connect failed\n");
728 ok(
r ==
TRUE,
"return wrong\n");
731 ok(
r ==
TRUE,
"return wrong\n");
734 ok(
r ==
TRUE,
"return wrong\n");
761 ok(
r ==
TRUE,
"return wrong\n");
764 ok( sz == 14 || sz == 16 || sz == 30,
"sz wrong, got %u, expected 14, 16 or 30\n", sz);
769 ok(
r ==
TRUE,
"return wrong\n");
792 ok(
version.dwMajorVersion == 1,
"dwMajorVersion=%d, expected 1\n",
version.dwMajorVersion);
793 ok(
version.dwMinorVersion == 2,
"dwMinorVersion=%d, expected 2\n",
version.dwMinorVersion);
801 static const char expect[] =
"Fri, 07 Jan 2005 12:06:35 GMT";
808 "InternetTimeFromSystemTimeA failed (%u)\n",
GetLastError() );
814 ok( !
ret,
"InternetTimeFromSystemTimeA should have returned FALSE\n" );
816 "InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u\n",
823 ok( !
ret,
"InternetTimeFromSystemTimeA should have returned FALSE\n" );
825 "InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u\n",
832 ok( !
ret,
"InternetTimeFromSystemTimeA should have returned FALSE\n" );
834 "InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u\n",
841 ok( !
ret,
"InternetTimeFromSystemTimeA should have returned FALSE\n" );
843 "InternetTimeFromSystemTimeA failed with ERROR_INSUFFICIENT_BUFFER instead of %u\n",
852 static const WCHAR expect[] = {
'F',
'r',
'i',
',',
' ',
'0',
'7',
' ',
'J',
'a',
'n',
' ',
'2',
'0',
'0',
'5',
' ',
853 '1',
'2',
':',
'0',
'6',
':',
'3',
'5',
' ',
'G',
'M',
'T',0 };
860 "InternetTimeFromSystemTimeW failed (%u)\n",
GetLastError() );
866 ok( !
ret,
"InternetTimeFromSystemTimeW should have returned FALSE\n" );
868 "InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u\n",
875 ok( !
ret,
"InternetTimeFromSystemTimeW should have returned FALSE\n" );
877 "InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u\n",
884 ok( !
ret,
"InternetTimeFromSystemTimeW should have returned FALSE\n" );
886 "InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u\n",
893 ok( !
ret,
"InternetTimeFromSystemTimeW should have returned FALSE\n" );
895 "InternetTimeFromSystemTimeW failed with ERROR_INSUFFICIENT_BUFFER instead of %u\n",
904 static const char string[] =
"Fri, 07 Jan 2005 12:06:35 GMT";
905 static const char string2[] =
" fri 7 jan 2005 12 06 35";
907 ret = pInternetTimeToSystemTimeA(
string, &
time, 0 );
910 "InternetTimeToSystemTimeA failed (%u)\n",
GetLastError() );
915 "InternetTimeToSystemTimeA failed (%u)\n",
GetLastError() );
923 static const WCHAR string[] = {
'F',
'r',
'i',
',',
' ',
'0',
'7',
' ',
'J',
'a',
'n',
' ',
'2',
'0',
'0',
'5',
' ',
924 '1',
'2',
':',
'0',
'6',
':',
'3',
'5',
' ',
'G',
'M',
'T',0 };
925 static const WCHAR string2[] = {
' ',
'f',
'r',
'i',
' ',
'7',
' ',
'j',
'a',
'n',
' ',
'2',
'0',
'0',
'5',
' ',
926 '1',
'2',
' ',
'0',
'6',
' ',
'3',
'5',0 };
932 ret = pInternetTimeToSystemTimeW(
NULL, &
time, 0 );
935 ret = pInternetTimeToSystemTimeW(
string,
NULL, 0 );
938 ret = pInternetTimeToSystemTimeW(
string, &
time, 0 );
941 ret = pInternetTimeToSystemTimeW(
string, &
time, 0 );
944 "InternetTimeToSystemTimeW failed (%u)\n",
GetLastError() );
949 "InternetTimeToSystemTimeW failed (%u)\n",
GetLastError() );
959 static const WCHAR dot[] = {
'.',0};
960 static const WCHAR uk[] = {
'u',
'k',0};
961 static const WCHAR com[] = {
'c',
'o',
'm',0};
962 static const WCHAR dot_com[] = {
'.',
'c',
'o',
'm',0};
963 static const WCHAR gmail_com[] = {
'g',
'm',
'a',
'i',
'l',
'.',
'c',
'o',
'm',0};
964 static const WCHAR dot_gmail_com[] = {
'.',
'g',
'm',
'a',
'i',
'l',
'.',
'c',
'o',
'm',0};
965 static const WCHAR www_gmail_com[] = {
'w',
'w',
'w',
'.',
'g',
'm',
'a',
'i',
'l',
'.',
'c',
'o',
'm',0};
966 static const WCHAR www_mail_gmail_com[] = {
'w',
'w',
'w',
'.',
'm',
'a',
'i',
'l',
'.',
'g',
'm',
'a',
'i',
'l',
'.',
'c',
'o',
'm',0};
967 static const WCHAR mail_gmail_com[] = {
'm',
'a',
'i',
'l',
'.',
'g',
'm',
'a',
'i',
'l',
'.',
'c',
'o',
'm',0};
968 static const WCHAR gmail_co_uk[] = {
'g',
'm',
'a',
'i',
'l',
'.',
'c',
'o',
'.',
'u',
'k',0};
969 static const WCHAR co_uk[] = {
'c',
'o',
'.',
'u',
'k',0};
970 static const WCHAR dot_co_uk[] = {
'.',
'c',
'o',
'.',
'u',
'k',0};
976 win_skip(
"IsDomainLegalCookieDomainW is not implemented\n");
981 "IsDomainLegalCookieDomainW succeeded\n");
984 ret = pIsDomainLegalCookieDomainW(com,
NULL);
985 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
988 ret = pIsDomainLegalCookieDomainW(
NULL, gmail_com);
989 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
992 ret = pIsDomainLegalCookieDomainW(
empty, gmail_com);
993 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
996 ret = pIsDomainLegalCookieDomainW(com,
empty);
997 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1000 ret = pIsDomainLegalCookieDomainW(gmail_com, dot);
1001 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1004 ret = pIsDomainLegalCookieDomainW(dot, gmail_com);
1005 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1008 ret = pIsDomainLegalCookieDomainW(com, com);
1009 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1012 ret = pIsDomainLegalCookieDomainW(com, dot_com);
1013 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1016 ret = pIsDomainLegalCookieDomainW(dot_com, com);
1017 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1020 ret = pIsDomainLegalCookieDomainW(com, gmail_com);
1021 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1023 ret = pIsDomainLegalCookieDomainW(gmail_com, gmail_com);
1024 ok(
ret,
"IsDomainLegalCookieDomainW failed\n");
1026 ret = pIsDomainLegalCookieDomainW(gmail_com, www_gmail_com);
1027 ok(
ret,
"IsDomainLegalCookieDomainW failed\n");
1029 ret = pIsDomainLegalCookieDomainW(gmail_com, www_mail_gmail_com);
1030 ok(
ret,
"IsDomainLegalCookieDomainW failed\n");
1033 ret = pIsDomainLegalCookieDomainW(gmail_co_uk, co_uk);
1034 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1036 ret = pIsDomainLegalCookieDomainW(
uk, co_uk);
1037 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1039 ret = pIsDomainLegalCookieDomainW(gmail_co_uk, dot_co_uk);
1040 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1042 ret = pIsDomainLegalCookieDomainW(co_uk, gmail_co_uk);
1045 ret = pIsDomainLegalCookieDomainW(gmail_co_uk, gmail_co_uk);
1046 ok(
ret,
"IsDomainLegalCookieDomainW failed\n");
1048 ret = pIsDomainLegalCookieDomainW(gmail_com, com);
1049 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1052 ret = pIsDomainLegalCookieDomainW(dot_gmail_com, mail_gmail_com);
1053 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1055 ret = pIsDomainLegalCookieDomainW(gmail_com, mail_gmail_com);
1056 ok(
ret,
"IsDomainLegalCookieDomainW failed\n");
1058 ret = pIsDomainLegalCookieDomainW(mail_gmail_com, gmail_com);
1059 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1061 ret = pIsDomainLegalCookieDomainW(mail_gmail_com, com);
1062 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1064 ret = pIsDomainLegalCookieDomainW(dot_gmail_com, mail_gmail_com);
1065 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1067 ret = pIsDomainLegalCookieDomainW(mail_gmail_com, dot_gmail_com);
1068 ok(!
ret,
"IsDomainLegalCookieDomainW succeeded\n");
1079 ok(
ret == 0,
"expected ret == 0, got %u\n",
ret);
1083 ok(
ret == 0,
"expected ret == 0, got %u\n",
ret);
1085 trace(
"template %u\n", old_template);
1089 ret = pPrivacyGetZonePreferenceW(
zone,
type, &old_template, pref, &pref_size);
1090 ok(
ret == 0,
"expected ret == 0, got %u\n",
ret);
1095 ok(
ret == 0,
"expected ret == 0, got %u\n",
ret);
1099 ok(
ret == 0,
"expected ret == 0, got %u\n",
ret);
1100 ok(
template == 5,
"expected template == 5, got %u\n",
template);
1103 ret = pPrivacySetZonePreferenceW(
zone,
type, old_template, pref_size ? pref :
NULL);
1104 ok(
ret == 0,
"expected ret == 0, got %u\n",
ret);
1117 ok(con != 0,
"InternetConnect failed: 0x%08x\n",
GetLastError());
1119 ok(req != 0,
"HttpOpenRequest failed: 0x%08x\n",
GetLastError());
1124 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1126 "given ERROR_INVALID_PARAMETER, gave: 0x%08x\n",
GetLastError());
1130 ok(
ret ==
FALSE,
"InternetQueryOption should've failed\n");
1132 "given ERROR_INVALID_PARAMETER, gave: 0x%08x\n",
GetLastError());
1136 size =
sizeof(ulArg);
1138 ok(
ret ==
FALSE,
"InternetQueryOption should've failed\n");
1144 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1150 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1155 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1160 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1166 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1170 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1173 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1176 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1179 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1183 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1188 ok(
ret ==
FALSE,
"InternetSetOption should've failed\n");
1205 ok(
ret ==
TRUE,
"InternetSetCookie failed\n");
1209 ok(
ret ==
TRUE,
"InternetGetCookie failed\n");
1210 ok(
len != 0,
"len = 0\n");
1213 ok(
ret,
"InternetSetOption(INTERNET_OPTION_END_BROWSER_SESSION) failed: %u\n",
GetLastError());
1221#define verifyProxyEnable(e) r_verifyProxyEnable(__LINE__, e)
1227 static const CHAR szInternetSettings[] =
"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings";
1228 static const CHAR szProxyEnable[] =
"ProxyEnable";
1231 ok_(__FILE__,
l) (!
ret,
"RegOpenKeyA failed: 0x%08x\n",
ret);
1234 ok_(__FILE__,
l) (!
ret,
"RegQueryValueExA failed: 0x%08x\n",
ret);
1236 ok_(__FILE__,
l) (
val ==
exp,
"Expected ProxyEnabled to be %d, got: %d\n",
exp,
val);
1239 ok_(__FILE__,
l) (!
ret,
"RegCloseKey failed: 0x%08x\n",
ret);
1248 static WCHAR proxy_srvW[] = {
'p',
'r',
'o',
'x',
'y',
'.',
'e',
'x',
'a',
'm',
'p',
'l',
'e',0};
1251 list.dwOptionCount = 2;
1259 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1260 orig_settings =
list.pOptions;
1263 list.dwOptionCount = 2;
1267 list.pOptions[0].Value.pszValue = proxy_srvW;
1273 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1278 list.dwOptionCount = 2;
1279 list.dwOptionError = 0;
1287 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1289 "Retrieved proxy server should've been %s, was: %s\n",
1292 "Retrieved flags should've been PROXY_TYPE_PROXY, was: %d\n",
1293 list.pOptions[1].Value.dwValue);
1300 list.dwOptionCount = 1;
1308 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1313 list.dwOptionCount = 1;
1314 list.dwOptionError = 0;
1321 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1323 "Retrieved flags should've been PROXY_TYPE_DIRECT, was: %d\n",
1324 list.pOptions[0].Value.dwValue);
1330 list.dwOptionCount = 1;
1338 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1343 list.dwOptionCount = 1;
1344 list.dwOptionError = 0;
1351 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1353 "Retrieved flags should've been PROXY_TYPE_PROXY | PROXY_TYPE_DIRECT, was: %d\n",
1354 list.pOptions[0].Value.dwValue);
1360 list.dwOptionCount = 2;
1361 list.pOptions = orig_settings;
1365 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1376 char proxy_srv[] =
"proxy.example";
1379 list.dwOptionCount = 2;
1387 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1388 orig_settings =
list.pOptions;
1391 list.dwOptionCount = 2;
1395 list.pOptions[0].Value.pszValue = proxy_srv;
1401 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1406 list.dwOptionCount = 2;
1407 list.dwOptionError = 0;
1415 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1417 "Retrieved proxy server should've been \"%s\", was: \"%s\"\n",
1418 proxy_srv,
list.pOptions[0].Value.pszValue);
1420 "Retrieved flags should've been PROXY_TYPE_PROXY, was: %d\n",
1421 list.pOptions[1].Value.dwValue);
1427 list.dwOptionCount = 1;
1430 list.pOptions[0].Value.pszValue =
NULL;
1433 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1436 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1441 list.dwOptionCount = 1;
1442 list.dwOptionError = 0;
1447 ok(
ret ==
TRUE,
"InternetQueryOption should've succeeded\n");
1448 ok(!
list.pOptions[0].Value.pszValue,
1449 "Retrieved proxy server should've been NULL, was: \"%s\"\n",
1450 list.pOptions[0].Value.pszValue);
1456 list.dwOptionCount = 2;
1457 list.pOptions = orig_settings;
1461 ok(
ret ==
TRUE,
"InternetSetOption should've succeeded\n");
1466#define FLAG_TODO 0x1
1467#define FLAG_NEEDREQ 0x2
1468#define FLAG_UNIMPL 0x4
1476 static const struct {
1508 ok(con != 0,
"InternetConnect failed: 0x%08x\n",
GetLastError());
1510 ok(req != 0,
"HttpOpenRequest failed: 0x%08x\n",
GetLastError());
1523 test_flags = no_ui_res[
j].test_flags;
1532 ok(test_flags &
FLAG_UNIMPL,
"%i is unexpectedly unimplemented.\n",
i);
1604 if(!pInternetGetConnectedStateExA) {
1605 win_skip(
"InternetGetConnectedStateExA is not supported\n");
1616 win_skip(
"InternetGetConnectedStateExA tests require a valid connection\n");
1620 res = pInternetGetConnectedStateExA(
NULL,
NULL, 0, 0);
1624 res = pInternetGetConnectedStateExA(&
flags,
NULL, 0, 0);
1641 ok(
flags,
"Expected at least one flag set\n");
1648 ok(sz > 0,
"Expected a connection name\n");
1654 ok(
flags,
"Expected at least one flag set\n");
1656 ok(sz > 0,
"Expected a connection name\n");
1661 ok(
flags,
"Expected at least one flag set\n");
1668 ok(
flags,
"Expected at least one flag set\n");
1675 ok(
flags,
"Expected at least one flag set\n");
1682 ok(
flags,
"Expected at least one flag set\n");
1689 ok(
flags,
"Expected at least one flag set\n");
1696 ok(
flags,
"Expected at least one flag set\n");
1706 if(!pInternetGetConnectedStateExW) {
1707 win_skip(
"InternetGetConnectedStateExW is not supported\n");
1718 win_skip(
"InternetGetConnectedStateExW tests require a valid connection\n");
1722 res = pInternetGetConnectedStateExW(
NULL,
NULL, 0, 0);
1726 res = pInternetGetConnectedStateExW(&
flags,
NULL, 0, 0);
1743 ok(
flags,
"Expected at least one flag set\n");
1750 ok(sz > 0,
"Expected a connection name\n");
1756 ok(
flags,
"Expected at least one flag set\n");
1758 ok(sz > 0,
"Expected a connection name\n");
1763 ok(
flags,
"Expected at least one flag set\n");
1770 ok(
flags,
"Expected at least one flag set\n");
1780 ok(
flags,
"Expected at least one flag set\n");
1790 ok(
flags,
"Expected at least one flag set\n");
1797 ok(
flags,
"Expected at least one flag set\n");
1807 ok(
flags,
"Expected at least one flag set\n");
1819 ok(
ret == 0,
"FormatMessageA returned %d\n",
ret);
1823 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1827 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1831 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1835 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1839 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1847 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1851 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1855 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1859 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1863 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1867 ok(
ret != 0,
"FormatMessageA returned %d\n",
ret);
1879 pInternetTimeFromSystemTimeA = (
void*)
GetProcAddress(
hdll,
"InternetTimeFromSystemTimeA");
1880 pInternetTimeFromSystemTimeW = (
void*)
GetProcAddress(
hdll,
"InternetTimeFromSystemTimeW");
1881 pInternetTimeToSystemTimeA = (
void*)
GetProcAddress(
hdll,
"InternetTimeToSystemTimeA");
1882 pInternetTimeToSystemTimeW = (
void*)
GetProcAddress(
hdll,
"InternetTimeToSystemTimeW");
1884 pPrivacyGetZonePreferenceW = (
void*)
GetProcAddress(
hdll,
"PrivacyGetZonePreferenceW");
1885 pPrivacySetZonePreferenceW = (
void*)
GetProcAddress(
hdll,
"PrivacySetZonePreferenceW");
1888 pInternetGetConnectedStateExA = (
void*)
GetProcAddress(
hdll,
"InternetGetConnectedStateExA");
1889 pInternetGetConnectedStateExW = (
void*)
GetProcAddress(
hdll,
"InternetGetConnectedStateExW");
1891 if(!pInternetGetCookieExW) {
1892 win_skip(
"Too old IE (older than 6.0)\n");
1911 if (!pInternetTimeFromSystemTimeA)
1912 win_skip(
"skipping the InternetTime tests\n");
1920 if (pIsDomainLegalCookieDomainW &&
1921 ((
void*)pIsDomainLegalCookieDomainW == (
void*)pCreateUrlCacheContainerA ||
1922 (
void*)pIsDomainLegalCookieDomainW == (
void*)pCreateUrlCacheContainerW))
1923 win_skip(
"IsDomainLegalCookieDomainW is not available on systems with IE5\n");
1924 else if (!pIsDomainLegalCookieDomainW)
1925 win_skip(
"IsDomainLegalCookieDomainW (or ordinal 117) is not available\n");
1929 if (pPrivacyGetZonePreferenceW && pPrivacySetZonePreferenceW)
1932 win_skip(
"Privacy[SG]etZonePreferenceW are not available\n");
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
#define RegCloseKey(hKey)
#define ERROR_INSUFFICIENT_BUFFER
static const WCHAR szEmpty[]
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
static const WCHAR empty[]
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define ERROR_NO_MORE_ITEMS
#define ERROR_NOT_SUPPORTED
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
static const WCHAR version[]
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest, DWORD dwError, DWORD dwFlags, LPVOID *lppvData)
HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession, LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion, LPCSTR lpszReferrer, LPCSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext)
BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength)
static const WCHAR szInternetSettings[]
BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, LPDWORD lpdwBufferLength)
BOOL WINAPI InternetCanonicalizeUrlA(LPCSTR lpszUrl, LPSTR lpszBuffer, LPDWORD lpdwBufferLength, DWORD dwFlags)
HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType, LPCSTR lpszProxy, LPCSTR lpszProxyBypass, DWORD dwFlags)
HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl, LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext)
BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength)
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
HINTERNET WINAPI InternetConnectA(HINTERNET hInternet, LPCSTR lpszServerName, INTERNET_PORT nServerPort, LPCSTR lpszUserName, LPCSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
HINTERNET WINAPI InternetConnectW(HINTERNET hInternet, LPCWSTR lpszServerName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags)
BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, LPVOID lpBuffer, DWORD dwBufferLength)
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
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
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 GLint GLint j
int WINAPI lstrlenA(LPCSTR lpString)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static CHAR string2[MAX_PATH]
#define todo_wine_if(is_todo)
static CHAR string3[MAX_PATH]
static void test_PrivacyGetSetZonePreferenceW(void)
static void r_verifyProxyEnable(LONG l, DWORD exp)
static void test_Option_PerConnectionOption(void)
static void test_IsDomainLegalCookieDomainW(void)
static void test_get_cookie(void)
static void test_InternetQueryOptionA(void)
static void test_cookie_url(void)
static void test_InternetErrorDlg(void)
static void InternetTimeToSystemTimeW_test(void)
static void test_InternetCanonicalizeUrlA(void)
static void test_max_conns(void)
static void test_InternetSetOption(void)
static void test_InternetGetConnectedStateExA(void)
static void test_Option_PerConnectionOptionA(void)
static void test_end_browser_session(void)
static void test_InternetGetConnectedStateExW(void)
static void test_cookie_attrs(void)
static void test_complicated_cookie(void)
static void test_null(void)
static void InternetTimeFromSystemTimeW_test(void)
static void test_version(void)
#define verifyProxyEnable(e)
static void InternetTimeToSystemTimeA_test(void)
static void test_format_message(HMODULE hdll)
static void InternetTimeFromSystemTimeA_test(void)
static const WCHAR about_blankW[]
DWORD WINAPI GetLastError(void)
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_FROM_HMODULE
#define ERROR_INVALID_OPERATION
#define NTE_PROV_TYPE_NOT_DEF
#define ERROR_BAD_ARGUMENTS
#define INTERNET_DEFAULT_HTTP_PORT
BOOL WINAPI InternetGetCookieA(const char *url, const char *name, char *data, DWORD *size)
BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName, LPCSTR lpCookieData)
DWORD WINAPI InternetSetCookieExA(LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR lpszCookieData, DWORD dwFlags, DWORD_PTR dwReserved)
BOOL WINAPI InternetGetCookieW(const WCHAR *url, const WCHAR *name, WCHAR *data, DWORD *size)
BOOL WINAPI InternetSetCookieW(const WCHAR *url, const WCHAR *name, const WCHAR *data)
BOOL WINAPI InternetGetCookieExA(LPCSTR lpszUrl, LPCSTR lpszCookieName, LPSTR lpCookieData, LPDWORD lpdwSize, DWORD flags, void *reserved)
#define INTERNET_OPTION_CONNECTED_STATE
#define INTERNET_CONNECTION_MODEM
#define ERROR_INTERNET_SEC_CERT_CN_INVALID
#define INTERNET_ERROR_BASE
#define ERROR_INTERNET_INVALID_URL
#define INTERNET_PER_CONN_FLAGS
#define ERROR_INTERNET_OPERATION_CANCELLED
#define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR
#define INTERNET_RFC1123_FORMAT
#define ERROR_INTERNET_NEED_UI
#define INTERNET_OPTION_USER_AGENT
#define INTERNET_SERVICE_FTP
#define ERROR_INTERNET_ITEM_NOT_FOUND
#define PROXY_TYPE_DIRECT
#define ERROR_INTERNET_TIMEOUT
#define ERROR_INTERNET_INSERT_CDROM
#define ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT
struct _INTERNET_PER_CONN_OPTION_LISTW INTERNET_PER_CONN_OPTION_LISTW
#define INTERNET_OPTION_CONNECT_TIMEOUT
#define ERROR_INTERNET_FORTEZZA_LOGIN_NEEDED
#define ERROR_INTERNET_CONNECTION_ABORTED
#define ERROR_INTERNET_INVALID_CA
#define ERROR_INTERNET_INCORRECT_PASSWORD
#define INTERNET_CONNECTION_LAN
#define ERROR_INTERNET_SEC_CERT_DATE_INVALID
#define ERROR_INTERNET_CHG_POST_IS_NON_SECURE
#define INTERNET_CONNECTION_CONFIGURED
#define INTERNET_OPEN_TYPE_DIRECT
#define INTERNET_PER_CONN_PROXY_SERVER
#define INTERNET_OPTION_MAX_CONNS_PER_SERVER
#define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED
#define ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION
#define INTERNET_OPTION_PROXY
#define INTERNET_RFC1123_BUFSIZE
#define FLAGS_ERROR_UI_FLAGS_NO_UI
#define ERROR_INTERNET_INVALID_OPERATION
#define INTERNET_OPTION_PER_CONNECTION_OPTION
#define ERROR_HTTP_COOKIE_DECLINED
#define ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION
#define ERROR_INTERNET_MIXED_SECURITY
#define INTERNET_OPTION_VERSION
#define ERROR_INTERNET_SEC_CERT_WEAK_SIGNATURE
#define INTERNET_OPTION_ERROR_MASK
#define ERROR_INTERNET_INVALID_OPTION
#define INTERNET_RAS_INSTALLED
#define ERROR_INTERNET_CANNOT_CONNECT
#define INTERNET_COOKIE_HTTPONLY
#define INTERNET_OPTION_POLICY
#define ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR
#define ERROR_INTERNET_NAME_NOT_RESOLVED
#define INTERNET_ERROR_LAST
#define ERROR_INTERNET_POST_IS_NON_SECURE
#define ERROR_INTERNET_SEC_CERT_REV_FAILED
#define PRIVACY_TEMPLATE_ADVANCED
#define ERROR_INTERNET_INCORRECT_HANDLE_TYPE
#define INTERNET_OPTION_REFRESH
#define ERROR_INTERNET_BAD_OPTION_LENGTH
#define ERROR_INTERNET_SEC_CERT_REVOKED
#define ERROR_INTERNET_SEC_CERT_ERRORS
#define ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT
struct _INTERNET_PER_CONN_OPTION_LISTA INTERNET_PER_CONN_OPTION_LISTA
#define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR
#define INTERNET_OPTION_SETTINGS_CHANGED
#define INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER
#define ERROR_INTERNET_UNRECOGNIZED_SCHEME
#define INTERNET_OPTION_END_BROWSER_SESSION
#define ERROR_INTERNET_INTERNAL_ERROR
#define INTERNET_SERVICE_HTTP
#define INTERNET_OPTION_REQUEST_FLAGS
#define ERROR_INTERNET_PROXY_ALERT
#define HKEY_CURRENT_USER
HWND WINAPI GetDesktopWindow(void)