Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6cde7564
Commit
6cde7564
authored
Sep 03, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Make tests pass on Win7. Conform to the more recent behavior.
parent
f7a4936f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
27 deletions
+29
-27
notification.c
dlls/winhttp/tests/notification.c
+15
-15
url.c
dlls/winhttp/tests/url.c
+12
-10
url.c
dlls/winhttp/url.c
+2
-2
No files found.
dlls/winhttp/tests/notification.c
View file @
6cde7564
...
...
@@ -103,11 +103,11 @@ static const struct notification cache_test[] =
{
winhttp_send_request
,
WINHTTP_CALLBACK_STATUS_REQUEST_SENT
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
}
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
,
1
}
};
static
void
setup_test
(
struct
info
*
info
,
enum
api
function
,
unsigned
int
line
)
...
...
@@ -227,11 +227,11 @@ static const struct notification redirect_test[] =
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_REQUEST_SENT
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
}
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
,
1
}
};
static
void
test_redirect
(
void
)
...
...
@@ -309,11 +309,11 @@ static const struct notification async_test[] =
{
winhttp_read_data
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
,
1
},
{
winhttp_read_data
,
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
,
0
,
1
},
{
winhttp_read_data
,
WINHTTP_CALLBACK_STATUS_READ_COMPLETE
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
0
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
}
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
0
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
,
1
},
{
winhttp_close_handle
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
1
,
1
}
};
static
void
test_async
(
void
)
...
...
dlls/winhttp/tests/url.c
View file @
6cde7564
...
...
@@ -144,16 +144,18 @@ static void WinHttpCreateUrl_test( void )
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpCreateUrl
(
&
uc
,
0
,
NULL
,
&
len
);
ok
(
!
ret
,
"expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"expected ERROR_INSUFFICIENT_BUFFER got %u
\n
"
,
GetLastError
()
);
ok
(
len
==
57
,
"expected len 57 got %u
\n
"
,
len
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INSUFFICIENT_BUFFER or ERROR_INVALID_PARAMETER got %u
\n
"
,
GetLastError
()
);
/* correct size, NULL url */
fill_url_components
(
&
uc
);
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpCreateUrl
(
&
uc
,
0
,
NULL
,
&
len
);
ok
(
!
ret
,
"expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"expected ERROR_INSUFFICIENT_BUFFER got %u
\n
"
,
GetLastError
()
);
ok
(
len
==
57
,
"expected len 57 got %u
\n
"
,
len
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INSUFFICIENT_BUFFER or ERROR_INVALID_PARAMETER got %u
\n
"
,
GetLastError
()
);
/* valid components, allocated url, short length */
SetLastError
(
0xdeadbeef
);
...
...
@@ -315,7 +317,7 @@ static void reset_url_components( URL_COMPONENTS *uc )
static
void
WinHttpCrackUrl_test
(
void
)
{
URL_COMPONENTSW
uc
;
WCHAR
scheme
[
20
],
user
[
20
],
pass
[
20
],
host
[
20
],
path
[
40
],
extra
[
2
0
];
WCHAR
scheme
[
20
],
user
[
20
],
pass
[
20
],
host
[
20
],
path
[
80
],
extra
[
4
0
];
DWORD
error
;
BOOL
ret
;
...
...
@@ -499,17 +501,17 @@ static void WinHttpCrackUrl_test( void )
uc
.
dwHostNameLength
=
20
;
uc
.
nPort
=
0
;
uc
.
lpszUrlPath
=
path
;
uc
.
dwUrlPathLength
=
4
0
;
uc
.
dwUrlPathLength
=
8
0
;
uc
.
lpszExtraInfo
=
extra
;
uc
.
dwExtraInfoLength
=
2
0
;
uc
.
dwExtraInfoLength
=
4
0
;
path
[
0
]
=
0
;
ret
=
WinHttpCrackUrl
(
url8
,
0
,
ICU_DECODE
,
&
uc
);
ok
(
ret
,
"WinHttpCrackUrl failed
\n
"
);
ok
(
ret
,
"WinHttpCrackUrl failed
%u
\n
"
,
GetLastError
()
);
ok
(
!
memcmp
(
uc
.
lpszUrlPath
+
11
,
escape
,
21
*
sizeof
(
WCHAR
)
),
"unexpected path
\n
"
);
ok
(
uc
.
dwUrlPathLength
==
32
,
"unexpected path length
\n
"
);
ok
(
uc
.
dwUrlPathLength
==
32
,
"unexpected path length
%u
\n
"
,
uc
.
dwUrlPathLength
);
ok
(
!
memcmp
(
uc
.
lpszExtraInfo
,
escape
+
21
,
12
*
sizeof
(
WCHAR
)
),
"unexpected extra info
\n
"
);
ok
(
uc
.
dwExtraInfoLength
==
12
,
"unexpected extra info length
\n
"
);
ok
(
uc
.
dwExtraInfoLength
==
12
,
"unexpected extra info length
%u
\n
"
,
uc
.
dwExtraInfoLength
);
/* Urls with specified port numbers */
/* decoding with buffers */
...
...
dlls/winhttp/url.c
View file @
6cde7564
...
...
@@ -368,7 +368,7 @@ BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDW
TRACE
(
"%p, 0x%08x, %p, %p
\n
"
,
uc
,
flags
,
url
,
required
);
if
(
!
uc
||
uc
->
dwStructSize
!=
sizeof
(
URL_COMPONENTS
)
||
!
required
)
if
(
!
uc
||
uc
->
dwStructSize
!=
sizeof
(
URL_COMPONENTS
)
||
!
required
||
!
url
)
{
set_last_error
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
...
...
@@ -376,7 +376,7 @@ BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS uc, DWORD flags, LPWSTR url, LPDW
if
(
!
calc_length
(
uc
,
flags
,
&
len
))
return
FALSE
;
if
(
!
url
||
*
required
<
len
)
if
(
*
required
<
len
)
{
*
required
=
len
+
1
;
set_last_error
(
ERROR_INSUFFICIENT_BUFFER
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment