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
b2be840e
Commit
b2be840e
authored
Jul 17, 2008
by
Zac Brown
Committed by
Alexandre Julliard
Jul 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp/tests: Add test for opening request.
parent
67201a14
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
105 additions
and
0 deletions
+105
-0
.gitignore
.gitignore
+1
-0
Makefile.in
Makefile.in
+2
-0
configure
configure
+3
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/Makefile.in
+1
-0
Makefile.in
dlls/winhttp/tests/Makefile.in
+13
-0
winhttp.c
dlls/winhttp/tests/winhttp.c
+80
-0
Makefile.in
programs/winetest/Makefile.in
+3
-0
winetest.rc
programs/winetest/winetest.rc
+1
-0
No files found.
.gitignore
View file @
b2be840e
...
...
@@ -333,6 +333,7 @@ programs/winetest/usp10_test.exe
programs/winetest/uxtheme_test.exe
programs/winetest/version_test.exe
programs/winetest/winetest
programs/winetest/winhttp_test.exe
programs/winetest/wininet_test.exe
programs/winetest/winmm_test.exe
programs/winetest/winspool.drv_test.exe
...
...
Makefile.in
View file @
b2be840e
...
...
@@ -496,6 +496,7 @@ ALL_MAKEFILES = \
dlls/winex11.drv/Makefile
\
dlls/wing32/Makefile
\
dlls/winhttp/Makefile
\
dlls/winhttp/tests/Makefile
\
dlls/wininet/Makefile
\
dlls/wininet/tests/Makefile
\
dlls/winmm/Makefile
\
...
...
@@ -926,6 +927,7 @@ dlls/winequartz.drv/Makefile: dlls/winequartz.drv/Makefile.in dlls/Makedll.rules
dlls/winex11.drv/Makefile
:
dlls/winex11.drv/Makefile.in dlls/Makedll.rules
dlls/wing32/Makefile
:
dlls/wing32/Makefile.in dlls/Makedll.rules
dlls/winhttp/Makefile
:
dlls/winhttp/Makefile.in dlls/Makedll.rules
dlls/winhttp/tests/Makefile
:
dlls/winhttp/tests/Makefile.in dlls/Maketest.rules
dlls/wininet/Makefile
:
dlls/wininet/Makefile.in dlls/Makedll.rules
dlls/wininet/tests/Makefile
:
dlls/wininet/tests/Makefile.in dlls/Maketest.rules
dlls/winmm/Makefile
:
dlls/winmm/Makefile.in dlls/Makedll.rules
...
...
configure
View file @
b2be840e
...
...
@@ -22418,6 +22418,8 @@ ac_config_files="$ac_config_files dlls/wing32/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/winhttp/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/winhttp/tests/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/wininet/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/wininet/tests/Makefile"
...
...
@@ -23484,6 +23486,7 @@ do
"dlls/winex11.drv/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/winex11.drv/Makefile" ;;
"dlls/wing32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/wing32/Makefile" ;;
"dlls/winhttp/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/winhttp/Makefile" ;;
"dlls/winhttp/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/winhttp/tests/Makefile" ;;
"dlls/wininet/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/wininet/Makefile" ;;
"dlls/wininet/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/wininet/tests/Makefile" ;;
"dlls/winmm/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/winmm/Makefile" ;;
...
...
configure.ac
View file @
b2be840e
...
...
@@ -2038,6 +2038,7 @@ AC_CONFIG_FILES([dlls/winequartz.drv/Makefile])
AC_CONFIG_FILES([dlls/winex11.drv/Makefile])
AC_CONFIG_FILES([dlls/wing32/Makefile])
AC_CONFIG_FILES([dlls/winhttp/Makefile])
AC_CONFIG_FILES([dlls/winhttp/tests/Makefile])
AC_CONFIG_FILES([dlls/wininet/Makefile])
AC_CONFIG_FILES([dlls/wininet/tests/Makefile])
AC_CONFIG_FILES([dlls/winmm/Makefile])
...
...
dlls/Makefile.in
View file @
b2be840e
...
...
@@ -363,6 +363,7 @@ TESTSUBDIRS = \
usp10/tests
\
uxtheme/tests
\
version/tests
\
winhttp/tests
\
wininet/tests
\
winmm/tests
\
winspool.drv/tests
\
...
...
dlls/winhttp/tests/Makefile.in
0 → 100644
View file @
b2be840e
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
winhttp.dll
IMPORTS
=
winhttp kernel32
CTESTS
=
\
winhttp.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/winhttp/tests/winhttp.c
0 → 100644
View file @
b2be840e
/*
* WinHTTP - tests
*
* Copyright 2008 Google (Zac Brown)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winhttp.h>
#include "wine/test.h"
static
const
WCHAR
test_useragent
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'R'
,
'e'
,
'g'
,
'r'
,
'e'
,
's'
,
's'
,
'i'
,
'o'
,
'n'
,
' '
,
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
test_server
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
static
void
test_OpenRequest
(
void
)
{
BOOL
ret
;
HINTERNET
session
,
request
,
connection
;
session
=
WinHttpOpen
(
test_useragent
,
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
,
WINHTTP_NO_PROXY_NAME
,
WINHTTP_NO_PROXY_BYPASS
,
0
);
todo_wine
ok
(
session
!=
NULL
,
"WinHttpOpen failed to open session.
\n
"
);
/* Test with a bad server name */
SetLastError
(
0xdeadbeef
);
connection
=
WinHttpConnect
(
session
,
NULL
,
INTERNET_DEFAULT_HTTP_PORT
,
0
);
ok
(
connection
==
NULL
,
"WinHttpConnect succeeded in opening connection to NULL server argument.
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %u.
\n
"
,
GetLastError
());
/* Test with a valid server name */
connection
=
WinHttpConnect
(
session
,
test_server
,
INTERNET_DEFAULT_HTTP_PORT
,
0
);
todo_wine
ok
(
connection
!=
NULL
,
"WinHttpConnect failed to open a connection, error: %u.
\n
"
,
GetLastError
());
request
=
WinHttpOpenRequest
(
connection
,
NULL
,
NULL
,
NULL
,
WINHTTP_NO_REFERER
,
WINHTTP_DEFAULT_ACCEPT_TYPES
,
0
);
if
(
request
==
NULL
&&
GetLastError
()
==
ERROR_WINHTTP_NAME_NOT_RESOLVED
)
{
skip
(
"Network unreachable, skipping.
\n
"
);
goto
done
;
}
todo_wine
ok
(
request
!=
NULL
,
"WinHttpOpenrequest failed to open a request, error: %u.
\n
"
,
GetLastError
());
ret
=
WinHttpSendRequest
(
request
,
WINHTTP_NO_ADDITIONAL_HEADERS
,
0
,
NULL
,
0
,
0
,
0
);
todo_wine
ok
(
ret
==
TRUE
,
"WinHttpSendRequest failed: %u
\n
"
,
GetLastError
());
ret
=
WinHttpCloseHandle
(
request
);
todo_wine
ok
(
ret
==
TRUE
,
"WinHttpCloseHandle failed on closing request, got %d.
\n
"
,
ret
);
done:
ret
=
WinHttpCloseHandle
(
connection
);
todo_wine
ok
(
ret
==
TRUE
,
"WinHttpCloseHandle failed on closing connection, got %d.
\n
"
,
ret
);
ret
=
WinHttpCloseHandle
(
session
);
todo_wine
ok
(
ret
==
TRUE
,
"WinHttpCloseHandle failed on closing session, got %d.
\n
"
,
ret
);
}
START_TEST
(
winhttp
)
{
test_OpenRequest
();
}
programs/winetest/Makefile.in
View file @
b2be840e
...
...
@@ -101,6 +101,7 @@ TESTBINS = \
usp10_test.exe
\
uxtheme_test.exe
\
version_test.exe
\
winhttp_test.exe
\
wininet_test.exe
\
winmm_test.exe
\
winspool.drv_test.exe
\
...
...
@@ -261,6 +262,8 @@ uxtheme_test.exe: $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT)
cp
$(DLLDIR)
/uxtheme/tests/uxtheme_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
version_test.exe
:
$(DLLDIR)/version/tests/version_test.exe$(DLLEXT)
cp
$(DLLDIR)
/version/tests/version_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
winhttp_test.exe
:
$(DLLDIR)/winhttp/tests/winhttp_test.exe$(DLLEXT)
cp
$(DLLDIR)
/winhttp/tests/winhttp_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
wininet_test.exe
:
$(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT)
cp
$(DLLDIR)
/wininet/tests/wininet_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
winmm_test.exe
:
$(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT)
...
...
programs/winetest/winetest.rc
View file @
b2be840e
...
...
@@ -162,6 +162,7 @@ userenv_test.exe TESTRES "userenv_test.exe"
usp10_test.exe TESTRES "usp10_test.exe"
uxtheme_test.exe TESTRES "uxtheme_test.exe"
version_test.exe TESTRES "version_test.exe"
winhttp_test.exe TESTRES "winhttp_test.exe"
wininet_test.exe TESTRES "wininet_test.exe"
winmm_test.exe TESTRES "winmm_test.exe"
winspool.drv_test.exe TESTRES "winspool.drv_test.exe"
...
...
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