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
d4a7a9d4
Commit
d4a7a9d4
authored
Dec 22, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Avoid test failures on win9x.
parent
f0a35db2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
http.c
dlls/wininet/tests/http.c
+28
-4
No files found.
dlls/wininet/tests/http.c
View file @
d4a7a9d4
...
...
@@ -1754,7 +1754,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
static
void
test_basic_request
(
int
port
,
const
char
*
verb
,
const
char
*
url
)
{
HINTERNET
hi
,
hc
,
hr
;
DWORD
r
,
count
,
error
;
DWORD
r
,
count
;
char
buffer
[
0x100
];
hi
=
InternetOpen
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
...
...
@@ -1766,11 +1766,8 @@ static void test_basic_request(int port, const char *verb, const char *url)
hr
=
HttpOpenRequest
(
hc
,
verb
,
url
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
hr
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
SetLastError
(
0xdeadbeef
);
r
=
HttpSendRequest
(
hr
,
NULL
,
0
,
NULL
,
0
);
error
=
GetLastError
();
ok
(
r
,
"HttpSendRequest failed
\n
"
);
ok
(
error
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
error
);
count
=
0
;
memset
(
buffer
,
0
,
sizeof
buffer
);
...
...
@@ -1784,6 +1781,32 @@ static void test_basic_request(int port, const char *verb, const char *url)
InternetCloseHandle
(
hi
);
}
static
void
test_last_error
(
int
port
)
{
HINTERNET
hi
,
hc
,
hr
;
DWORD
error
;
BOOL
r
;
hi
=
InternetOpen
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
ok
(
hi
!=
NULL
,
"open failed
\n
"
);
hc
=
InternetConnect
(
hi
,
"localhost"
,
port
,
NULL
,
NULL
,
INTERNET_SERVICE_HTTP
,
0
,
0
);
ok
(
hc
!=
NULL
,
"connect failed
\n
"
);
hr
=
HttpOpenRequest
(
hc
,
NULL
,
"/test1"
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
hr
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
SetLastError
(
0xdeadbeef
);
r
=
HttpSendRequest
(
hr
,
NULL
,
0
,
NULL
,
0
);
error
=
GetLastError
();
ok
(
r
,
"HttpSendRequest failed
\n
"
);
ok
(
error
==
ERROR_SUCCESS
||
broken
(
error
!=
ERROR_SUCCESS
),
"expected ERROR_SUCCESS, got %u
\n
"
,
error
);
InternetCloseHandle
(
hr
);
InternetCloseHandle
(
hc
);
InternetCloseHandle
(
hi
);
}
static
void
test_proxy_indirect
(
int
port
)
{
HINTERNET
hi
,
hc
,
hr
;
...
...
@@ -2427,6 +2450,7 @@ static void test_http_connection(void)
test_response_without_headers
(
si
.
port
);
test_HttpQueryInfo
(
si
.
port
);
test_HttpSendRequestW
(
si
.
port
);
test_last_error
(
si
.
port
);
/* send the basic request again to shutdown the server thread */
test_basic_request
(
si
.
port
,
"GET"
,
"/quit"
);
...
...
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