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
4c640f24
Commit
4c640f24
authored
Jan 09, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Fix test failures on Windows XP.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3a224073
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
http.c
dlls/wininet/tests/http.c
+19
-4
No files found.
dlls/wininet/tests/http.c
View file @
4c640f24
...
...
@@ -42,6 +42,7 @@
#define TEST_URL "http://test.winehq.org/tests/hello.html"
static
BOOL
first_connection_to_test_url
=
TRUE
;
static
BOOL
https_support
=
TRUE
;
/* Adapted from dlls/urlmon/tests/protocol.c */
...
...
@@ -6220,6 +6221,12 @@ static void test_security_flags(void)
char
buf
[
100
];
BOOL
res
;
if
(
!
https_support
)
{
win_skip
(
"Can't make https connections, skipping security flags test
\n
"
);
return
;
}
trace
(
"Testing security flags...
\n
"
);
reset_events
();
...
...
@@ -6556,7 +6563,7 @@ static void test_secure_connection(void)
static
const
WCHAR
get
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
static
const
WCHAR
testpage
[]
=
{
'/'
,
't'
,
'e'
,
's'
,
't'
,
's'
,
'/'
,
'h'
,
'e'
,
'l'
,
'l'
,
'o'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
HINTERNET
ses
,
con
,
req
;
DWORD
size
,
flags
;
DWORD
size
,
flags
,
err
;
INTERNET_CERTIFICATE_INFOA
*
certificate_structA
=
NULL
;
INTERNET_CERTIFICATE_INFOW
*
certificate_structW
=
NULL
;
BOOL
ret
;
...
...
@@ -6574,11 +6581,13 @@ static void test_secure_connection(void)
ok
(
req
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
ret
=
HttpSendRequestA
(
req
,
NULL
,
0
,
NULL
,
0
);
ok
(
ret
||
broken
(
GetLastError
()
==
ERROR_INTERNET_CANNOT_CONNECT
),
"HttpSendRequest failed: %d
\n
"
,
GetLastError
());
err
=
GetLastError
();
ok
(
ret
||
broken
(
err
==
ERROR_INTERNET_CANNOT_CONNECT
)
||
broken
(
err
==
ERROR_INTERNET_SECURITY_CHANNEL_ERROR
),
"HttpSendRequest failed: %u
\n
"
,
err
);
if
(
!
ret
)
{
win_skip
(
"Cannot connect to https.
\n
"
);
if
(
err
==
ERROR_INTERNET_SECURITY_CHANNEL_ERROR
)
https_support
=
FALSE
;
goto
done
;
}
...
...
@@ -7375,6 +7384,11 @@ static void test_default_service_port(void)
ok
(
request
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
ret
=
HttpSendRequestA
(
request
,
NULL
,
0
,
NULL
,
0
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_INTERNET_SECURITY_CHANNEL_ERROR
)
{
win_skip
(
"Can't make https connection
\n
"
);
goto
done
;
}
ok
(
ret
,
"HttpSendRequest failed with error %u
\n
"
,
GetLastError
());
size
=
sizeof
(
buffer
);
...
...
@@ -7402,6 +7416,7 @@ static void test_default_service_port(void)
ok
(
ret
,
"HttpQueryInfo failed with error %u
\n
"
,
GetLastError
());
ok
(
!
strcmp
(
buffer
,
"test.winehq.org:443"
),
"Expected test.winehg.org:443, got '%s'
\n
"
,
buffer
);
done:
InternetCloseHandle
(
request
);
InternetCloseHandle
(
connect
);
InternetCloseHandle
(
session
);
...
...
@@ -7529,6 +7544,7 @@ START_TEST(http)
InternetReadFile_test
(
INTERNET_FLAG_ASYNC
,
&
test_data
[
1
]);
InternetReadFile_test
(
0
,
&
test_data
[
1
]);
InternetReadFile_test
(
INTERNET_FLAG_ASYNC
,
&
test_data
[
2
]);
test_secure_connection
();
test_security_flags
();
InternetReadFile_test
(
0
,
&
test_data
[
2
]);
InternetReadFileExA_test
(
INTERNET_FLAG_ASYNC
);
...
...
@@ -7543,7 +7559,6 @@ START_TEST(http)
InternetOpenUrlA_test
();
HttpHeaders_test
();
test_http_connection
();
test_secure_connection
();
test_user_agent_header
();
test_bogus_accept_types_array
();
InternetReadFile_chunked_test
();
...
...
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