Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c441ad6a
Commit
c441ad6a
authored
Apr 13, 2023
by
Francois Gouget
Committed by
Alexandre Julliard
Apr 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Add more proxy tests.
parent
e6ac3499
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
internet.c
dlls/wininet/tests/internet.c
+29
-2
No files found.
dlls/wininet/tests/internet.c
View file @
c441ad6a
...
...
@@ -49,6 +49,11 @@ static BOOL (WINAPI *pInternetGetCookieExW)(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD
static
BOOL
(
WINAPI
*
pInternetGetConnectedStateExA
)(
LPDWORD
,
LPSTR
,
DWORD
,
DWORD
);
static
BOOL
(
WINAPI
*
pInternetGetConnectedStateExW
)(
LPDWORD
,
LPWSTR
,
DWORD
,
DWORD
);
#ifndef ERROR_WINHTTP_AUTODETECTION_FAILED
#define ERROR_WINHTTP_AUTODETECTION_FAILED 12180
#endif
/* ############################### */
static
void
test_InternetCanonicalizeUrlA
(
void
)
...
...
@@ -163,11 +168,27 @@ static void test_InternetQueryOptionA(void)
{
HINTERNET
hinet
,
hurl
;
DWORD
len
,
val
;
INTERNET_PROXY_INFOA
*
pi
;
DWORD
err
;
static
const
char
useragent
[]
=
{
"Wininet Test"
};
char
proxy
[
256
];
char
*
buffer
;
int
retval
;
BOOL
res
;
BOOL
retval
,
res
;
SetLastError
(
0xdeadfeed
);
memset
(
proxy
,
0
,
sizeof
(
proxy
));
res
=
DetectAutoProxyUrl
(
proxy
,
sizeof
(
proxy
),
PROXY_AUTO_DETECT_TYPE_DHCP
);
todo_wine
ok
((
res
&&
proxy
[
0
])
||
(
!
res
&&
GetLastError
()
==
ERROR_WINHTTP_AUTODETECTION_FAILED
&&
!
proxy
[
0
]),
"unexpected DHCP proxy result: %d gle %lu proxy %s
\n
"
,
res
,
GetLastError
(),
proxy
);
SetLastError
(
0xdeadfeed
);
memset
(
proxy
,
0
,
sizeof
(
proxy
));
res
=
DetectAutoProxyUrl
(
proxy
,
sizeof
(
proxy
),
PROXY_AUTO_DETECT_TYPE_DNS_A
);
todo_wine
ok
((
res
&&
proxy
[
0
])
||
(
!
res
&&
GetLastError
()
==
ERROR_WINHTTP_AUTODETECTION_FAILED
&&
!
proxy
[
0
])
||
broken
(
!
res
&&
GetLastError
()
==
ERROR_NOT_FOUND
&&
!
proxy
[
0
]),
"unexpected DNS proxy result: %d gle %lu proxy %s
\n
"
,
res
,
GetLastError
(),
proxy
);
SetLastError
(
0xdeadbeef
);
len
=
0xdeadbeef
;
...
...
@@ -175,6 +196,12 @@ static void test_InternetQueryOptionA(void)
ok
(
!
retval
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Got wrong error %x(%lu)
\n
"
,
retval
,
GetLastError
());
ok
(
len
>=
sizeof
(
INTERNET_PROXY_INFOA
)
&&
len
!=
0xdeadbeef
,
"len = %lu
\n
"
,
len
);
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
retval
=
InternetQueryOptionA
(
NULL
,
INTERNET_OPTION_PROXY
,
pi
,
&
len
);
ok
(
retval
,
"Failed (%lu)
\n
"
,
GetLastError
());
ok
(
len
>=
sizeof
(
INTERNET_PROXY_INFOA
)
&&
len
!=
0xdeadbeef
,
"len = %lu
\n
"
,
len
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
hinet
=
InternetOpenA
(
useragent
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
ok
((
hinet
!=
0x0
),
"InternetOpen Failed
\n
"
);
...
...
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