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
858caa9a
Commit
858caa9a
authored
Mar 24, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Merge GetLastError() test into other request tests.
parent
c3566b08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
28 deletions
+4
-28
http.c
dlls/wininet/tests/http.c
+4
-28
No files found.
dlls/wininet/tests/http.c
View file @
858caa9a
...
...
@@ -2213,7 +2213,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
;
DWORD
r
,
count
,
error
;
char
buffer
[
0x100
];
hi
=
InternetOpenA
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
...
...
@@ -2225,7 +2225,10 @@ static void test_basic_request(int port, const char *verb, const char *url)
hr
=
HttpOpenRequestA
(
hc
,
verb
,
url
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
hr
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
SetLastError
(
0xdeadbeef
);
r
=
HttpSendRequestA
(
hr
,
NULL
,
0
,
NULL
,
0
);
error
=
GetLastError
();
ok
(
error
==
ERROR_SUCCESS
||
broken
(
error
!=
ERROR_SUCCESS
),
"expected ERROR_SUCCESS, got %u
\n
"
,
error
);
ok
(
r
,
"HttpSendRequest failed
\n
"
);
count
=
0
;
...
...
@@ -2241,32 +2244,6 @@ 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
=
InternetOpenA
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
ok
(
hi
!=
NULL
,
"open failed
\n
"
);
hc
=
InternetConnectA
(
hi
,
"localhost"
,
port
,
NULL
,
NULL
,
INTERNET_SERVICE_HTTP
,
0
,
0
);
ok
(
hc
!=
NULL
,
"connect failed
\n
"
);
hr
=
HttpOpenRequestA
(
hc
,
NULL
,
"/test1"
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
hr
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
SetLastError
(
0xdeadbeef
);
r
=
HttpSendRequestA
(
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
;
...
...
@@ -3994,7 +3971,6 @@ 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
);
test_options
(
si
.
port
);
test_no_content
(
si
.
port
);
test_conn_close
(
si
.
port
);
...
...
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