35#define TEST_URL "http://www.winehq.org/site/about#hi"
36#define TEST_URL3 "file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml"
38#define CREATE_URL1 "http://username:password@www.winehq.org/site/about"
39#define CREATE_URL2 "http://username@www.winehq.org/site/about"
40#define CREATE_URL3 "http://username:"
41#define CREATE_URL4 "http://www.winehq.org/site/about"
42#define CREATE_URL5 "http://"
43#define CREATE_URL6 "nhttp://username:password@www.winehq.org:80/site/about"
44#define CREATE_URL7 "http://username:password@www.winehq.org:42/site/about"
45#define CREATE_URL8 "https://username:password@www.winehq.org/site/about"
46#define CREATE_URL9 "about:blank"
47#define CREATE_URL10 "about://host/blank"
48#define CREATE_URL11 "about:"
49#define CREATE_URL12 "http://www.winehq.org:65535"
50#define CREATE_URL13 "http://localhost/?test=123"
63 dst->dwSchemeLength = scheLen;
64 dst->dwHostNameLength = hostLen;
65 dst->dwUserNameLength = userLen;
66 dst->dwPasswordLength = passLen;
67 dst->dwUrlPathLength = pathLen;
68 dst->dwExtraInfoLength = extrLen;
83 dst->dwSchemeLength = scheLen;
84 dst->dwHostNameLength = hostLen;
85 dst->dwUserNameLength = userLen;
86 dst->dwPasswordLength = passLen;
87 dst->dwUrlPathLength = pathLen;
88 dst->dwExtraInfoLength = extrLen;
118 {
"http://www.winehq.org/site/about#hi",
119 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, -1, 80, -1, 0, -1, 0, 21, 11, 32, 3,
120 "http",
"www.winehq.org",
"",
"",
"/site/about",
"#hi"},
121 {
"http://www.myserver.com/myscript.php?arg=1",
122 0, 4,
INTERNET_SCHEME_HTTP, 7, 16, -1, 80, -1, 0, -1, 0, 23, 13, 36, 6,
123 "http",
"www.myserver.com",
"",
"",
"/myscript.php",
"?arg=1"},
124 {
"http://www.winehq.org?test=123",
125 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 0, 21, 9,
126 "http",
"www.winehq.org",
"",
"",
"",
"?test=123"},
127 {
"http://www.winehq.org/myscript.php;test=123",
128 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 22, -1, 0,
129 "http",
"www.winehq.org",
"",
"",
"/myscript.php;test=123",
""},
130 {
"HtTp://www.winehq.org/scheme",
131 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 7, -1, 0,
132 "HtTp",
"www.winehq.org",
"",
"",
"/scheme",
""},
133 {
"http://www.winehq.org",
134 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 0, -1, 0,
135 "http",
"www.winehq.org",
"",
"",
"",
""},
136 {
"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
137 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0,
138 "file",
"",
"",
"",
"C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml",
""},
139 {
"fide:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
140 0, 4,
INTERNET_SCHEME_UNKNOWN, 7, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0,
141 "fide",
"",
"",
"",
"/C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
""},
142 {
"file://C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
143 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 54, -1, 0,
144 "file",
"",
"",
"",
"C:\\Program%20Files\\Atmel\\AVR%20Tools\\STK500\\STK500.xml",
""},
145 {
"file://C:/Program%20Files/Atmel/..",
146 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 27, -1, 0,
147 "file",
"",
"",
"",
"C:\\Program%20Files\\Atmel\\..\\",
""},
148 {
"file://C:/Program%20Files/Atmel/../Asdf.xml",
149 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 36, -1, 0,
150 "file",
"",
"",
"",
"C:\\Program%20Files\\Atmel\\..\\Asdf.xml",
""},
151 {
"file:///C:/Program%20Files/Atmel/..",
152 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 28, -1, 0,
153 "file",
"",
"",
"",
"C:\\Program Files\\Atmel\\..\\",
""},
154 {
"file:///C:/Program%20Files/Atmel/../Asdf.xml",
155 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 37, -1, 0,
156 "file",
"",
"",
"",
"C:\\Program Files\\Atmel\\..\\Asdf.xml",
""},
157 {
"file://C:/Program%20Files/Atmel/.",
158 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 26, -1, 0,
159 "file",
"",
"",
"",
"C:\\Program%20Files\\Atmel\\.\\",
""},
160 {
"file://C:/Program%20Files/Atmel/./Asdf.xml",
161 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 35, -1, 0,
162 "file",
"",
"",
"",
"C:\\Program%20Files\\Atmel\\.\\Asdf.xml",
""},
163 {
"file:///C:/Program%20Files/Atmel/.",
164 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 27, -1, 0,
165 "file",
"",
"",
"",
"C:\\Program Files\\Atmel\\.\\",
""},
166 {
"file:///C:/Program%20Files/Atmel/./Asdf.xml",
167 0, 4,
INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 36, -1, 0,
168 "file",
"",
"",
"",
"C:\\Program Files\\Atmel\\.\\Asdf.xml",
""},
170 0, 1,
INTERNET_SCHEME_UNKNOWN, -1, 0, -1, 0, -1, 0, -1, 0, 2, 9, -1, 0,
171 "C",
"",
"",
"",
"\\file.txt",
""},
172 {
"res://IELib.dll/test.htm",
173 0, 3,
INTERNET_SCHEME_RES, 6, 9, -1, 0, -1, 0, -1, 0, 15, 9, -1, 0,
174 "res",
"IELib.dll",
"",
"",
"/test.htm",
""},
175 {
"gopher://www.winehq.org/site/about#hi",
176 0, 6,
INTERNET_SCHEME_GOPHER, 9, 14, -1, 0, -1, 0, -1, 0, 23, 11, 34, 3,
177 "gopher",
"www.winehq.org",
"",
"",
"/site/about",
"#hi"},
203 char *scheme_a, *hostname_a, *username_a;
204 char *password_a, *extrainfo_a, *urlpath_a;
205 WCHAR *scheme_w, *hostname_w, *username_w;
206 WCHAR *password_w, *extrainfo_w, *urlpath_w;
217 if(
test->scheme_off == -1)
218 ok(!
url.lpszScheme,
"[%s] url.lpszScheme = %p, expected NULL\n",
test->url,
url.lpszScheme);
220 ok(
url.lpszScheme ==
test->url+
test->scheme_off,
"[%s] url.lpszScheme = %p, expected %p\n",
222 ok(
url.dwSchemeLength ==
test->scheme_len,
"[%s] url.lpszSchemeLength = %ld, expected %d\n",
225 ok(
url.nScheme ==
test->scheme,
"[%s] url.nScheme = %d, expected %d\n",
test->url,
url.nScheme,
test->scheme);
227 if(
test->host_off == -1)
228 ok(!
url.lpszHostName,
"[%s] url.lpszHostName = %p, expected NULL\n",
test->url,
url.lpszHostName);
230 ok(
url.lpszHostName ==
test->url+
test->host_off,
"[%s] url.lpszHostName = %p, expected %p\n",
232 if(
test->host_skip_broken != -1 &&
url.dwHostNameLength ==
test->host_skip_broken) {
233 win_skip(
"skipping broken dwHostNameLength result\n");
236 ok(
url.dwHostNameLength ==
test->host_len,
"[%s] url.lpszHostNameLength = %ld, expected %d\n",
239 ok(
url.nPort ==
test->port,
"[%s] nPort = %d, expected %d\n",
test->url,
url.nPort,
test->port);
241 if(
test->user_off == -1)
242 ok(!
url.lpszUserName,
"[%s] url.lpszUserName = %p\n",
test->url,
url.lpszUserName);
244 ok(
url.lpszUserName ==
test->url+
test->user_off,
"[%s] url.lpszUserName = %p, expected %p\n",
246 ok(
url.dwUserNameLength ==
test->user_len,
"[%s] url.lpszUserNameLength = %ld, expected %d\n",
249 if(
test->pass_off == -1)
250 ok(!
url.lpszPassword,
"[%s] url.lpszPassword = %p\n",
test->url,
url.lpszPassword);
252 ok(
url.lpszPassword ==
test->url+
test->pass_off,
"[%s] url.lpszPassword = %p, expected %p\n",
254 ok(
url.dwPasswordLength ==
test->pass_len,
"[%s] url.lpszPasswordLength = %ld, expected %d\n",
257 if(
test->path_off == -1)
258 ok(!
url.lpszUrlPath,
"[%s] url.lpszUrlPath = %p, expected NULL\n",
test->url,
url.lpszUrlPath);
260 ok(
url.lpszUrlPath ==
test->url+
test->path_off,
"[%s] url.lpszUrlPath = %p, expected %p\n",
262 ok(
url.dwUrlPathLength ==
test->path_len,
"[%s] url.lpszUrlPathLength = %ld, expected %d\n",
265 if(
test->extra_off == -1)
266 ok(!
url.lpszExtraInfo,
"[%s] url.lpszExtraInfo = %p, expected NULL\n",
test->url,
url.lpszExtraInfo);
268 ok(
url.lpszExtraInfo ==
test->url+
test->extra_off,
"[%s] url.lpszExtraInfo = %p, expected %p\n",
270 ok(
url.dwExtraInfoLength ==
test->extra_len,
"[%s] url.lpszExtraInfoLength = %ld, expected %d\n",
271 test->url,
url.dwExtraInfoLength,
test->extra_len);
286 win_skip(
"InternetCrackUrlW is not implemented\n");
292 if(
test->scheme_off == -1)
302 if(
test->host_off == -1) {
315 if(
test->user_off == -1) {
326 if(
test->pass_off == -1) {
337 if(
test->path_off == -1)
345 if(
test->extra_off == -1) {
365 url.lpszScheme = scheme_a;
366 url.dwSchemeLength = buf_len;
367 url.lpszHostName = hostname_a;
368 url.dwHostNameLength = buf_len;
369 url.lpszUserName = username_a;
370 url.dwUserNameLength = buf_len;
371 url.lpszPassword = password_a;
372 url.dwPasswordLength = buf_len;
373 url.lpszUrlPath = urlpath_a;
374 url.dwUrlPathLength = buf_len;
375 url.lpszExtraInfo = extrainfo_a;
376 url.dwExtraInfoLength = buf_len;
381 ok(
url.dwSchemeLength ==
strlen(
test->exp_scheme),
"[%s] Got wrong scheme length: %ld\n",
382 test->url,
url.dwSchemeLength);
383 ok(!
strcmp(scheme_a,
test->exp_scheme),
"[%s] Got wrong scheme, expected: %s, got: %s\n",
384 test->url,
test->exp_scheme, scheme_a);
386 ok(
url.nScheme ==
test->scheme,
"[%s] Got wrong nScheme, expected: %d, got: %d\n",
389 ok(
url.dwHostNameLength ==
strlen(
test->exp_hostname),
"[%s] Got wrong hostname length: %ld\n",
390 test->url,
url.dwHostNameLength);
391 ok(!
strcmp(hostname_a,
test->exp_hostname),
"[%s] Got wrong hostname, expected: %s, got: %s\n",
392 test->url,
test->exp_hostname, hostname_a);
394 ok(
url.nPort ==
test->port,
"[%s] Got wrong port, expected: %d, got: %d\n",
397 ok(
url.dwUserNameLength ==
strlen(
test->exp_username),
"[%s] Got wrong username length: %ld\n",
398 test->url,
url.dwUserNameLength);
399 ok(!
strcmp(username_a,
test->exp_username),
"[%s] Got wrong username, expected: %s, got: %s\n",
400 test->url,
test->exp_username, username_a);
402 ok(
url.dwPasswordLength ==
strlen(
test->exp_password),
"[%s] Got wrong password length: %ld\n",
403 test->url,
url.dwPasswordLength);
404 ok(!
strcmp(password_a,
test->exp_password),
"[%s] Got wrong password, expected: %s, got: %s\n",
405 test->url,
test->exp_password, password_a);
407 ok(
url.dwUrlPathLength ==
strlen(
test->exp_urlpath),
"[%s] Got wrong urlpath length: %ld\n",
408 test->url,
url.dwUrlPathLength);
409 ok(!
strcmp(urlpath_a,
test->exp_urlpath),
"[%s] Got wrong urlpath, expected: %s, got: %s\n",
410 test->url,
test->exp_urlpath, urlpath_a);
412 ok(
url.dwExtraInfoLength ==
strlen(
test->exp_extrainfo),
"[%s] Got wrong extrainfo length: %ld\n",
413 test->url,
url.dwExtraInfoLength);
414 ok(!
strcmp(extrainfo_a,
test->exp_extrainfo),
"[%s] Got wrong extrainfo, expected: %s, got: %s\n",
415 test->url,
test->exp_extrainfo, extrainfo_a);
438 ok(!
strcmp_wa(scheme_w,
test->exp_scheme),
"[%s] Got wrong scheme, expected: %s, got: %s\n",
441 ok(urlw.
nScheme ==
test->scheme,
"[%s] Got wrong nScheme, expected: %d, got: %d\n",
446 ok(!
strcmp_wa(hostname_w,
test->exp_hostname),
"[%s] Got wrong hostname, expected: %s, got: %s\n",
449 ok(urlw.
nPort ==
test->port,
"[%s] Got wrong port, expected: %d, got: %d\n",
454 ok(!
strcmp_wa(username_w,
test->exp_username),
"[%s] Got wrong username, expected: %s, got: %s\n",
459 ok(!
strcmp_wa(password_w,
test->exp_password),
"[%s] Got wrong password, expected: %s, got: %s\n",
464 ok(!
strcmp_wa(urlpath_w,
test->exp_urlpath),
"[%s] Got wrong urlpath, expected: %s, got: %s\n",
469 ok(!
strcmp_wa(extrainfo_w,
test->exp_extrainfo),
"[%s] Got wrong extrainfo, expected: %s, got: %s\n",
484 char long_url[
sizeof(long_buf) + 1000];
486 {long_url, 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, -1, 80, -1, 0, -1, 0, 21,
sizeof(long_buf)-1, -1, 0,
487 "http",
"www.winehq.org",
"",
"", long_buf,
""};
489 {long_url, 0, 4,
INTERNET_SCHEME_HTTP, 7, 14, -1, 80, -1, 0, -1, 0, 21, 6, 27,
sizeof(long_buf)-1,
490 "http",
"www.winehq.org",
"",
"",
"/path/", long_buf};
494 memset(long_buf,
'x',
sizeof(long_buf));
496 long_buf[
sizeof(long_buf)-1] = 0;
498 strcpy(long_url,
"http://www.winehq.org");
499 strcat(long_url, long_buf);
502 strcpy(long_url,
"http://www.winehq.org/path/");
504 strcat(long_url, long_buf);
543 copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024);
548 copy_compsA(&urlSrc, &urlComponents, 32, 0, 1024, 1024, 1024, 1024);
552 ok(
ret==firstret && (
GLE==firstGLE),
"InternetCrackUrl returned %d with GLE=%ld (expected to return %d)\n",
555 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 0, 1024, 1024, 1024);
559 ok(
ret==firstret && (
GLE==firstGLE),
"InternetCrackUrl returned %d with GLE=%ld (expected to return %d)\n",
562 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 0, 1024, 1024);
566 ok(
ret==firstret && (
GLE==firstGLE),
"InternetCrackUrl returned %d with GLE=%ld (expected to return %d)\n",
569 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 0, 1024);
575 "InternetCrackUrl returned %d with GLE=%ld (expected to return 0 and ERROR_INVALID_HANDLE or ERROR_INSUFFICIENT_BUFFER)\n",
578 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 0);
584 "InternetCrackUrl returned %d with GLE=%ld (expected to return 0 and ERROR_INVALID_HANDLE or ERROR_INSUFFICIENT_BUFFER)\n",
587 copy_compsA(&urlSrc, &urlComponents, 0, 0, 0, 0, 0, 0);
592 "InternetCrackUrl returned %d with GLE=%ld (expected to return 0 and ERROR_INVALID_PARAMETER)\n",
595 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
604 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
607 ok(
ret ==
FALSE,
"Expected InternetCrackUrl to fail\n");
614 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
617 ok(
ret ==
FALSE,
"Expected InternetCrackUrl to fail\n");
622 copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024);
627 ok(
ret ==
FALSE,
"Expected InternetCrackUrl to fail\n");
633 copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024);
638 ok(
ret ==
FALSE,
"Expected InternetCrackUrl to fail\n");
642 memset(&urlComponents, 0,
sizeof(urlComponents));
646 ok(
ret ==
FALSE,
"Expected InternetCrackUrl to fail\n");
650 memset(&urlComponents, 0,
sizeof(urlComponents));
654 ok(
ret ==
FALSE,
"Expected InternetCrackUrl to fail\n");
659 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
663 "Expected dwHostNameLength of 5, got %ld\n", urlComponents.
dwHostNameLength);
665 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
669 copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024);
673 "Expected dwUrlPathLength of 0, got %ld\n", urlComponents.
dwUrlPathLength);
679 'h',
't',
't',
'p',
':',
'/',
'/',
'1',
'9',
'2',
'.',
'1',
'6',
'8',
'.',
'0',
'.',
'2',
'2',
'/',
680 'C',
'F',
'I',
'D',
'E',
'/',
'm',
'a',
'i',
'n',
'.',
'c',
'f',
'm',
'?',
'C',
'F',
'S',
'V',
'R',
681 '=',
'I',
'D',
'E',
'&',
'A',
'C',
'T',
'I',
'O',
'N',
'=',
'I',
'D',
'E',
'_',
'D',
'E',
'F',
'A',
683 static const WCHAR url2[] = {
'.',
'.',
'/',
'R',
'i',
't',
'z',
'.',
'x',
'm',
'l',0 };
684 static const WCHAR url3[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'x',
'.',
'o',
'r',
'g',0 };
685 static const WCHAR url4[] = {
'h',
't',
't',
'p',
':',
'/',
'/',0,
'x',
'.',
'o',
'r',
'g',0 };
686 static const WCHAR url5[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'x',
'.',
'o',
'r',
'g',0,
'/',
'x',0 };
698 memset(&comp, 0,
sizeof comp);
718 win_skip(
"InternetCrackUrlW is not implemented\n");
721 ok( !
r,
"InternetCrackUrlW succeeded unexpectedly\n");
724 "expected ERROR_INVALID_PARAMETER got %lu\n",
error);
732 ok( !
r,
"InternetCrackUrlW succeeded unexpectedly\n");
737 ok(
r,
"failed to crack url\n");
747 memset(&comp, 0,
sizeof comp);
755 ok(
r,
"failed to crack url\n");
765 memset(&comp, 0,
sizeof comp);
775 ok(
r,
"failed to crack url\n");
789 memset(&comp, 0,
sizeof(comp));
805 ok(!
r,
"InternetCrackUrl should have failed\n");
807 "InternetCrackUrl should have failed with error ERROR_INTERNET_UNRECOGNIZED_SCHEME instead of error %ld\n",
817 memset(&comp, 0,
sizeof comp);
832 ok(
r,
"InternetCrackUrlW failed unexpectedly\n");
833 ok(
host[0] ==
'x',
"host should be x.org\n");
834 ok( urlpart[0] == 0,
"urlpart should be empty\n");
838 memset(&comp, 0,
sizeof(comp));
845 ok(
r,
"InternetCrackUrlW failed unexpectedly\n");
847 todo_wine ok(urlpart[0] == 0,
"urlpart should be empty\n");
852 memset(&comp, 0,
sizeof(comp));
862 memset(&comp, 0,
sizeof(comp));
871 memset(&comp, 0,
sizeof(comp));
886 winehq[] =
"www.winehq.org",
889 site_about[] =
"/site/about",
898 lpUrlComponents->
nPort = 80;
919 winehq[] =
"www.winehq.org",
924 site_about[] =
"/site/about",
925 extra_info[] =
"?test=123",
933 ok(!
ret,
"Expected failure\n");
935 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
936 ok(
len == -1,
"Expected len -1, got %ld\n",
len);
942 ok(!
ret,
"Expected failure\n");
944 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
945 ok(
len == -1,
"Expected len -1, got %ld\n",
len);
951 ok(!
ret,
"Expected failure\n");
953 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
961 ok(!
ret,
"Expected failure\n");
963 "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n",
GetLastError());
964 ok(
len == 51,
"Expected len 51, got %ld\n",
len);
970 ok(!
ret,
"Expected failure\n");
972 "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n",
GetLastError());
973 ok(
len == 51,
"Expected len 51, got %ld\n",
len);
980 ok(!
ret,
"Expected failure\n");
982 "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n",
GetLastError());
983 ok(
len == 51,
"Expected len 51, got %ld\n",
len);
990 ok(
ret,
"Expected success\n");
991 ok(
len == 50,
"Expected len 50, got %ld\n",
len);
1001 ok(
ret,
"Expected success\n");
1002 ok(
len == 50,
"Expected len 50, got %ld\n",
len);
1008 ok(
ret,
"Expected success\n");
1009 ok(
len == 50,
"Expected len 50, got %ld\n",
len);
1010 ok(
strstr(szUrl,
"80") ==
NULL,
"Didn't expect to find 80 in szUrl\n");
1018 ok(
ret,
"Expected success\n");
1019 ok(
len == 41,
"Expected len 41, got %ld\n",
len);
1027 ok(
ret,
"Expected success\n");
1028 ok(
len == 50,
"Expected len 50, got %ld\n",
len);
1039 ok(!
ret,
"Expected failure\n");
1041 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
1042 ok(
len == 42,
"Expected len 42, got %ld\n",
len);
1052 ok(
ret,
"Expected success\n");
1053 ok(
len == 50,
"Expected len 50, got %ld\n",
len);
1062 ok(
ret,
"Expected success\n");
1063 ok(
len == 32,
"Expected len 32, got %ld\n",
len);
1072 ok(
ret,
"Expected success\n");
1073 ok(
len == 50,
"Expected len 50, got %ld\n",
len);
1086 ok(
ret,
"Expected success\n");
1097 ok(
ret,
"Expected success\n");
1098 ok(
len == 53,
"Expected len 53, got %ld\n",
len);
1099 ok(
strstr(szUrl,
"42") !=
NULL,
"Expected to find 42 in szUrl\n");
1104 memset(&urlComp, 0,
sizeof(urlComp));
1123 ok(
ret,
"Expected success\n");
1129 memset(&urlComp, 0,
sizeof(urlComp));
1136 urlComp.
nPort = 443;
1148 ok(
ret,
"Expected success\n");
1154 memset(&urlComp, 0,
sizeof(urlComp));
1164 ok(
ret,
"Expected success\n");
1170 memset(&urlComp, 0,
sizeof(urlComp));
1179 ok(
ret,
"Expected success\n");
1185 memset(&urlComp, 0,
sizeof(urlComp));
1187 urlComp.
nPort = 8080;
1192 ok(
ret,
"Expected success\n");
1198 memset(&urlComp, 0,
sizeof(urlComp));
1205 urlComp.
nPort = 65535;
1209 ok(
ret,
"Expected success\n");
1215 memset(&urlComp, 0,
sizeof(urlComp));
1229 ok(
ret,
"Expected success\n");
1235 memset(&urlComp, 0,
sizeof(urlComp));
1244 ok(!
ret,
"Expected failure\n");
1246 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
1253 char src[] =
"http://www.winehq.org/%27/ /./>/#> ";
1259 ok(
strcmp(
dst,
"http://www.winehq.org/%27/%20/%3E/#>") == 0,
"Got \"%s\"\n",
dst);
1264 ok(
strcmp(
dst,
"http://www.winehq.org/%27/%20/%3E/#>") == 0,
"Got \"%s\"\n",
dst);
1269 ok(
strcmp(
dst,
"http://www.winehq.org/%27/%20/%3E/#>") == 0,
"Got \"%s\"\n",
dst);
1273 ok(
strcmp(
dst,
"http://www.winehq.org/'/%20/%3E/#>") == 0,
"Got \"%s\"\n",
dst);
1277 ok(
strcmp(
dst,
"http://www.winehq.org/%2527/%20/%3E/#>") == 0,
"Got \"%s\"\n",
dst);
1281 ok(
strcmp(
dst,
"http://www.winehq.org/%27/%20/>/#>") == 0,
"Got \"%s\"\n",
dst);
1285 ok(
strcmp(
dst,
"http://www.winehq.org/%27/ />/#>") == 0,
"Got \"%s\"\n",
dst);
1289 ok(
strcmp(
dst,
"http://www.winehq.org/%27/%20/./%3E/#>") == 0,
"Got \"%s\"\n",
dst);
1297 win_skip(
"Too old IE (older than 6.0)\n");
void user(int argc, const char *argv[])
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define MultiByteToWideChar
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP char *__cdecl strstr(const char *, const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
BOOL WINAPI InternetCanonicalizeUrlA(LPCSTR lpszUrl, LPSTR lpszBuffer, LPDWORD lpdwBufferLength, DWORD dwFlags)
BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents, DWORD dwFlags, LPSTR lpszUrl, LPDWORD lpdwUrlLength)
BOOL WINAPI InternetCrackUrlW(const WCHAR *lpszUrl, DWORD dwUrlLength, DWORD dwFlags, URL_COMPONENTSW *lpUC)
BOOL WINAPI InternetCrackUrlA(const char *url, DWORD url_length, DWORD flags, URL_COMPONENTSA *ret_comp)
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
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
static const BYTE localhost[]
static const WCHAR url2[]
static const WCHAR url5[]
static const WCHAR url4[]
static void fill_url_components(URL_COMPONENTS *uc)
static const WCHAR url3[]
static void zero_compsA(URL_COMPONENTSA *dst, DWORD scheLen, DWORD hostLen, DWORD userLen, DWORD passLen, DWORD pathLen, DWORD extrLen)
static int strcmp_wa(const WCHAR *str1, const char *str2)
static void copy_compsA(URL_COMPONENTSA *src, URL_COMPONENTSA *dst, DWORD scheLen, DWORD hostLen, DWORD userLen, DWORD passLen, DWORD pathLen, DWORD extrLen)
static void InternetCrackUrlW_test(void)
static const crack_url_test_t crack_url_tests[]
static void test_crack_url(const crack_url_test_t *test)
static void InternetCreateUrlA_test(void)
static void InternetCrackUrl_test(void)
static WCHAR * a2w(const char *str)
static void test_long_url(void)
static void InternetCanonicalizeUrl_test(void)
XML_HIDDEN void xmlParserErrors const char const xmlChar const xmlChar * str2
XML_HIDDEN void xmlParserErrors const char const xmlChar * str1
const char * exp_hostname
const char * exp_username
const char * exp_extrainfo
const char * exp_password
DWORD WINAPI GetLastError(void)
#define ICU_ENCODE_SPACES_ONLY
#define INTERNET_SCHEME_HTTP
#define ICU_ENCODE_PERCENT
@ INTERNET_SCHEME_UNKNOWN
#define ERROR_INTERNET_UNRECOGNIZED_SCHEME
static const WCHAR userName[]