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
c0bfc2fb
Commit
c0bfc2fb
authored
Feb 09, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Added more url parsing tests.
parent
1db3e475
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
2 deletions
+44
-2
misc.c
dlls/urlmon/tests/misc.c
+44
-2
No files found.
dlls/urlmon/tests/misc.c
View file @
c0bfc2fb
...
@@ -780,7 +780,19 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface
...
@@ -780,7 +780,19 @@ static HRESULT WINAPI InternetProtocolInfo_ParseUrl(IInternetProtocolInfo *iface
PARSEACTION
ParseAction
,
DWORD
dwParseFlags
,
LPWSTR
pwzResult
,
DWORD
cchResult
,
PARSEACTION
ParseAction
,
DWORD
dwParseFlags
,
LPWSTR
pwzResult
,
DWORD
cchResult
,
DWORD
*
pcchResult
,
DWORD
dwReserved
)
DWORD
*
pcchResult
,
DWORD
dwReserved
)
{
{
CHECK_EXPECT
(
ParseUrl
);
CHECK_EXPECT2
(
ParseUrl
);
if
(
ParseAction
==
PARSE_SECURITY_URL
)
{
if
(
pcchResult
)
*
pcchResult
=
sizeof
(
url1
)
/
sizeof
(
WCHAR
);
if
(
cchResult
<
sizeof
(
url1
)
/
sizeof
(
WCHAR
))
return
S_FALSE
;
memcpy
(
pwzResult
,
url1
,
sizeof
(
url1
));
return
S_OK
;
}
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -825,7 +837,7 @@ static IClassFactory *expect_cf;
...
@@ -825,7 +837,7 @@ static IClassFactory *expect_cf;
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
if
(
IsEqualGUID
(
&
IID_IInternetProtocolInfo
,
riid
))
{
if
(
IsEqualGUID
(
&
IID_IInternetProtocolInfo
,
riid
))
{
CHECK_EXPECT
(
QI_IInternetProtocolInfo
);
CHECK_EXPECT
2
(
QI_IInternetProtocolInfo
);
ok
(
iface
==
expect_cf
,
"unexpected iface
\n
"
);
ok
(
iface
==
expect_cf
,
"unexpected iface
\n
"
);
*
ppv
=
&
protocol_info
;
*
ppv
=
&
protocol_info
;
return
qiret
;
return
qiret
;
...
@@ -896,6 +908,7 @@ static void test_NameSpace(void)
...
@@ -896,6 +908,7 @@ static void test_NameSpace(void)
{
{
IInternetSession
*
session
;
IInternetSession
*
session
;
WCHAR
buf
[
200
];
WCHAR
buf
[
200
];
LPWSTR
sec_url
;
DWORD
size
;
DWORD
size
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -943,6 +956,35 @@ static void test_NameSpace(void)
...
@@ -943,6 +956,35 @@ static void test_NameSpace(void)
CHECK_CALLED
(
QI_IInternetProtocolInfo
);
CHECK_CALLED
(
QI_IInternetProtocolInfo
);
CHECK_CALLED
(
ParseUrl
);
CHECK_CALLED
(
ParseUrl
);
SET_EXPECT
(
QI_IInternetProtocolInfo
);
SET_EXPECT
(
ParseUrl
);
hres
=
CoInternetParseUrl
(
url8
,
PARSE_SECURITY_URL
,
0
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
),
&
size
,
0
);
ok
(
hres
==
S_OK
,
"CoInternetParseUrl failed: %08x
\n
"
,
hres
);
ok
(
size
==
sizeof
(
url1
)
/
sizeof
(
WCHAR
),
"Size = %d, expected %d
\n
"
,
size
,
sizeof
(
url1
)
/
sizeof
(
WCHAR
));
if
(
size
==
sizeof
(
url1
)
/
sizeof
(
WCHAR
))
ok
(
!
memcmp
(
buf
,
url1
,
sizeof
(
url1
)),
"Encoded url = %s
\n
"
,
wine_dbgstr_w
(
buf
));
CHECK_CALLED
(
QI_IInternetProtocolInfo
);
CHECK_CALLED
(
ParseUrl
);
SET_EXPECT
(
QI_IInternetProtocolInfo
);
SET_EXPECT
(
ParseUrl
);
hres
=
CoInternetGetSecurityUrl
(
url8
,
&
sec_url
,
PSU_SECURITY_URL_ONLY
,
0
);
ok
(
hres
==
S_OK
,
"CoInternetGetSecurityUrl failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
{
ok
(
lstrlenW
(
sec_url
)
>
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
)
&&
!
memcmp
(
sec_url
,
wszFile
,
sizeof
(
wszFile
)
-
sizeof
(
WCHAR
)),
"Encoded url = %s
\n
"
,
wine_dbgstr_w
(
sec_url
));
CoTaskMemFree
(
sec_url
);
}
CHECK_CALLED
(
QI_IInternetProtocolInfo
);
CHECK_CALLED
(
ParseUrl
);
hres
=
IInternetSession_UnregisterNameSpace
(
session
,
&
test_protocol_cf
,
wszTest
);
hres
=
IInternetSession_UnregisterNameSpace
(
session
,
&
test_protocol_cf
,
wszTest
);
ok
(
hres
==
S_OK
,
"UnregisterNameSpace failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"UnregisterNameSpace failed: %08x
\n
"
,
hres
);
...
...
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