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
18c7070b
Commit
18c7070b
authored
Oct 07, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added basic tests for CoInternetCombineIUri.
parent
2aed8ce2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
uri.c
dlls/urlmon/tests/uri.c
+36
-0
uri.c
dlls/urlmon/uri.c
+10
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
18c7070b
...
...
@@ -36,6 +36,7 @@
static
HRESULT
(
WINAPI
*
pCreateUri
)(
LPCWSTR
,
DWORD
,
DWORD_PTR
,
IUri
**
);
static
HRESULT
(
WINAPI
*
pCreateUriWithFragment
)(
LPCWSTR
,
LPCWSTR
,
DWORD
,
DWORD_PTR
,
IUri
**
);
static
HRESULT
(
WINAPI
*
pCreateIUriBuilder
)(
IUri
*
,
DWORD
,
DWORD_PTR
,
IUriBuilder
**
);
static
HRESULT
(
WINAPI
*
pCoInternetCombineIUri
)(
IUri
*
,
IUri
*
,
DWORD
,
IUri
**
,
DWORD_PTR
);
static
const
WCHAR
http_urlW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'w'
,
'w'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
0
};
...
...
@@ -8633,6 +8634,37 @@ static void test_IUriBuilder_Misc(void) {
if
(
uri
)
IUri_Release
(
uri
);
}
static
void
test_CoInternetCombineIUri
(
void
)
{
HRESULT
hr
;
IUri
*
base
,
*
relative
,
*
result
;
base
=
NULL
;
hr
=
pCreateUri
(
http_urlW
,
0
,
0
,
&
base
);
ok
(
SUCCEEDED
(
hr
),
"Error: Expected CreateUri to succeed, got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
result
=
(
void
*
)
0xdeadbeef
;
hr
=
pCoInternetCombineIUri
(
base
,
NULL
,
0
,
&
result
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
ok
(
!
result
,
"Error: Expected 'result' to be NULL, was %p.
\n
"
,
result
);
}
relative
=
NULL
;
hr
=
pCreateUri
(
http_urlW
,
0
,
0
,
&
relative
);
ok
(
SUCCEEDED
(
hr
),
"Error: Expected CreateUri to succeed, got 0x%08x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
result
=
(
void
*
)
0xdeadbeef
;
hr
=
pCoInternetCombineIUri
(
NULL
,
relative
,
0
,
&
result
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
ok
(
!
result
,
"Error: Expected 'result' to be NULL, was %p.
\n
"
,
result
);
}
hr
=
pCoInternetCombineIUri
(
base
,
relative
,
0
,
NULL
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.
\n
"
,
hr
,
E_INVALIDARG
);
if
(
base
)
IUri_Release
(
base
);
if
(
relative
)
IUri_Release
(
relative
);
}
START_TEST
(
uri
)
{
HMODULE
hurlmon
;
...
...
@@ -8640,6 +8672,7 @@ START_TEST(uri) {
pCreateUri
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CreateUri"
);
pCreateUriWithFragment
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CreateUriWithFragment"
);
pCreateIUriBuilder
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CreateIUriBuilder"
);
pCoInternetCombineIUri
=
(
void
*
)
GetProcAddress
(
hurlmon
,
"CoInternetCombineIUri"
);
if
(
!
pCreateUri
)
{
win_skip
(
"CreateUri is not present, skipping tests.
\n
"
);
...
...
@@ -8711,4 +8744,7 @@ START_TEST(uri) {
trace
(
"test IUriBuilder miscellaneous...
\n
"
);
test_IUriBuilder_Misc
();
trace
(
"test CoInternetCombineIUri...
\n
"
);
test_CoInternetCombineIUri
();
}
dlls/urlmon/uri.c
View file @
18c7070b
...
...
@@ -5595,6 +5595,16 @@ HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserve
HRESULT
WINAPI
CoInternetCombineIUri
(
IUri
*
pBaseUri
,
IUri
*
pRelativeUri
,
DWORD
dwCombineFlags
,
IUri
**
ppCombinedUri
,
DWORD_PTR
dwReserved
)
{
TRACE
(
"(%p %p %x %p %x)
\n
"
,
pBaseUri
,
pRelativeUri
,
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
if
(
!
ppCombinedUri
)
return
E_INVALIDARG
;
if
(
!
pBaseUri
||
!
pRelativeUri
)
{
*
ppCombinedUri
=
NULL
;
return
E_INVALIDARG
;
}
FIXME
(
"(%p %p %x %p %x): stub
\n
"
,
pBaseUri
,
pRelativeUri
,
dwCombineFlags
,
ppCombinedUri
,
(
DWORD
)
dwReserved
);
return
E_NOTIMPL
;
}
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