31static WCHAR winehq[] = {
'w',
'w',
'w',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',0};
34static WCHAR about[] = {
'/',
's',
'i',
't',
'e',
'/',
'a',
'b',
'o',
'u',
't',0};
36static WCHAR escape[] = {
' ',
'!',
'"',
'#',
'$',
'%',
'&',
'\'',
'(',
')',
'*',
'+',
',',
'-',
'.',
'/',
':',
';',
'<',
'=',
'>',
37 '?',
'@',
'[',
'\\',
']',
'^',
'_',
'`',
'{',
'|',
'}',
'~',0};
42static const WCHAR url1[] =
L"http://username:password@www.winehq.org/site/about?query";
44static const WCHAR url3[] =
L"http://www.winehq.org/site/about?query";
46static const WCHAR url5[] =
L"ftp://username:password@www.winehq.org:80/site/about?query";
47static const WCHAR url6[] =
L"http://username:password@www.winehq.org:42/site/about?query";
48static const WCHAR url7[] =
L"http://username:password@www.winehq.org/site/about%20!%22%23$%25&'()"
49 "*+,-./:;%3C=%3E?@%5B%5C%5D%5E_%60%7B%7C%7D%7E";
50static const WCHAR url8[] =
L"http://username:password@www.winehq.org:0/site/about?query";
51static const WCHAR url9[] =
L"http://username:password@www.winehq.org:80/site/about?query";
52static const WCHAR url10[] =
L"https://username:password@www.winehq.org:443/site/about?query";
53static const WCHAR url11[] =
L"http://example.net/path?var1=example@example.com&var2=x&var3=y";
54static const WCHAR url12[] =
L"https://tools.google.com/service/update2?w=3:BxDHoWy8ezM";
55static const WCHAR url13[] =
L"http://winehq.o g/path with spaces";
63static const WCHAR url21[] =
L"https://nba2k19-ws.2ksports.com:19133/nba/v4/Accounts/get_account?x=3789526775265663876";
66static const WCHAR url_k1[] =
L"http://username:password@www.winehq.org/site/about";
107 ok( !
ret,
"expected failure\n" );
109 ok(
len == ~0
u,
"expected len ~0u got %lu\n",
len );
115 ok( !
ret,
"expected failure\n" );
117 ok(
len == ~0
u,
"expected len ~0u got %lu\n",
len );
123 ok( !
ret,
"expected failure\n" );
130 ok( !
ret,
"expected failure\n" );
132 ok(
len == 57,
"expected len 57 got %lu\n",
len );
139 ok( !
ret,
"expected failure\n" );
141 "expected ERROR_INVALID_PARAMETER got %lu\n",
GetLastError() );
149 ok( !
ret,
"expected failure\n" );
151 "expected ERROR_INVALID_PARAMETER got %lu\n",
GetLastError() );
160 ok( !
ret,
"expected failure\n" );
162 ok(
len == 57,
"expected len 57 got %lu\n",
len );
170 ok(
ret,
"expected success\n" );
173 ok(
len == 56,
"expected len 56 got %lu\n",
len );
182 ok(
ret,
"expected success\n" );
183 ok(
len == 56,
"expected len 56 got %lu\n",
len );
190 ok(
ret,
"expected success\n" );
191 ok(
len == 56,
"expected len 56 got %lu\n",
len );
200 ok(
ret,
"expected success\n" );
208 ok(
ret,
"expected success\n" );
209 ok(
len == 56,
"expected len 56 got %lu\n",
len );
219 ok( !
ret,
"expected failure\n" );
228 ok(
ret,
"expected success\n");
237 ok(
ret,
"expected success\n" );
238 ok(
len == 38,
"expected len 38 got %lu\n",
len );
248 ok(
ret,
"expected success\n" );
249 ok(
len == 56,
"expected len 56 got %lu\n",
len );
259 ok(
ret,
"expected success\n" );
270 ok(
ret,
"expected success\n" );
271 ok(
len == 59,
"expected len 59 got %lu\n",
len );
281 ok(
ret,
"expected success\n" );
282 ok(
len == 113,
"expected len 113 got %lu\n",
len );
286 memset( &uc, 0,
sizeof(uc) );
293 ok(
ret,
"expected success\n" );
298 memset( &uc, 0,
sizeof(uc) );
311 memset( &uc, 0,
sizeof(uc) );
326 memset( &uc, 0,
sizeof(uc) );
333 ok(
ret,
"expected success\n" );
338 memset( &uc, 0,
sizeof(uc) );
351 memset( &uc, 0,
sizeof(uc) );
374 ok(
ret,
"expected success\n" );
375 ok(
len == 58,
"expected len 58 got %lu\n",
len );
431 ok( uc.
nPort == 80,
"unexpected port: %u\n", uc.
nPort );
444 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
455 ok(
ret,
"WinHttpCrackUrl failed le = %lu\n",
error );
457 "got %lu, expected ERROR_SUCCESS\n",
error );
467 ok( uc.
nPort == 80,
"unexpected port: %u\n", uc.
nPort );
487 ok( uc.
nPort == 80,
"unexpected port: %u\n", uc.
nPort );
505 ok( uc.
nPort == 443,
"unexpected port: %u\n", uc.
nPort );
515 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
522 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
529 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
536 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
544 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
570 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
577 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
583 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
589 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
597 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
644 ok( uc.
nPort == 42,
"unexpected port: %u\n", uc.
nPort );
655 ok( uc.
nPort == 80,
"unexpected port: %u\n", uc.
nPort );
660 ok( uc.
nPort == 443,
"unexpected port: %u\n", uc.
nPort );
666 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
673 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
686 ok( uc.
nPort == 80,
"unexpected port: %u\n", uc.
nPort );
777 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
798 ok( !
ret,
"WinHttpCrackUrl succeeded\n" );
819 memset( &uc, 0,
sizeof(uc) );
void user(int argc, const char *argv[])
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
BOOL WINAPI WinHttpCreateUrl(URL_COMPONENTS *uc, DWORD flags, WCHAR *url, DWORD *required)
BOOL WINAPI WinHttpCrackUrl(const WCHAR *url, DWORD len, DWORD flags, URL_COMPONENTSW *uc)
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 * u
static const WCHAR url1[]
static const WCHAR url2[]
static const WCHAR url6[]
static const WCHAR url15[]
static void WinHttpCrackUrl_test(void)
static const WCHAR url_k6[]
static void WinHttpCreateUrl_test(void)
static const WCHAR url5[]
static const WCHAR url_k2[]
static const WCHAR url4[]
static void reset_url_components(URL_COMPONENTS *uc)
static const WCHAR url_k10[]
static const WCHAR url8[]
static const WCHAR url14[]
static const WCHAR url_k4[]
static const WCHAR url_k8[]
static const WCHAR url11[]
static const WCHAR url21[]
static const WCHAR url16[]
static const WCHAR url_k5[]
static const WCHAR url20[]
static void fill_url_components(URL_COMPONENTS *uc)
static const WCHAR url_k3[]
static const WCHAR url13[]
static const WCHAR url19[]
static const WCHAR url9[]
static const WCHAR url_k7[]
static const WCHAR url_k1[]
static const WCHAR url17[]
static const WCHAR url_k9[]
static const WCHAR url22[]
static const WCHAR url3[]
static const WCHAR url10[]
static const WCHAR url12[]
static const WCHAR url18[]
static const WCHAR url7[]
DWORD WINAPI GetLastError(void)
#define ERROR_WINHTTP_INVALID_URL
#define INTERNET_SCHEME_HTTP
#define ERROR_WINHTTP_UNRECOGNIZED_SCHEME
#define INTERNET_SCHEME_HTTPS