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
5cc277c6
Commit
5cc277c6
authored
Dec 16, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added tests for CoInternetGetSecurityUrl.
parent
fa2ec0f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
sec_mgr.c
dlls/urlmon/tests/sec_mgr.c
+42
-0
No files found.
dlls/urlmon/tests/sec_mgr.c
View file @
5cc277c6
...
@@ -91,6 +91,15 @@ static struct secmgr_test {
...
@@ -91,6 +91,15 @@ static struct secmgr_test {
{
url7
,
3
,
S_OK
,
sizeof
(
secid7
),
secid7
,
S_OK
}
{
url7
,
3
,
S_OK
,
sizeof
(
secid7
),
secid7
,
S_OK
}
};
};
static
int
strcmp_w
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
DWORD
len1
=
lstrlenW
(
str1
);
DWORD
len2
=
lstrlenW
(
str2
);
if
(
len1
!=
len2
)
return
1
;
return
memcmp
(
str1
,
str2
,
len1
*
sizeof
(
WCHAR
));
}
static
void
test_SecurityManager
(
void
)
static
void
test_SecurityManager
(
void
)
{
{
int
i
;
int
i
;
...
@@ -630,11 +639,44 @@ static void test_InternetSecurityMarshalling(void)
...
@@ -630,11 +639,44 @@ static void test_InternetSecurityMarshalling(void)
IInternetSecurityManager_Release
(
secmgr
);
IInternetSecurityManager_Release
(
secmgr
);
}
}
static
void
test_InternetGetSecurityUrl
(
void
)
{
const
WCHAR
url5_out
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'w'
,
'w'
,
'w'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
const
WCHAR
url7_out
[]
=
{
'f'
,
't'
,
'p'
,
':'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
const
WCHAR
*
in
[]
=
{
url2
,
url3
,
url4
,
url5
,
url7
,
url8
,
url9
,
url10
};
const
WCHAR
*
out_default
[]
=
{
url2
,
url3
,
url4
,
url5_out
,
url7_out
,
url8
,
url5_out
,
url10
};
const
WCHAR
*
out_securl
[]
=
{
url2
,
url3
,
url4
,
url5
,
url7
,
url8
,
url9
,
url10
};
WCHAR
*
sec
;
DWORD
i
;
HRESULT
hres
;
for
(
i
=
0
;
i
<
sizeof
(
in
)
/
sizeof
(
WCHAR
*
);
i
++
)
{
hres
=
CoInternetGetSecurityUrl
(
in
[
i
],
&
sec
,
PSU_DEFAULT
,
0
);
ok
(
hres
==
S_OK
,
"(%d) CoInternetGetSecurityUrl returned: %08x
\n
"
,
i
,
hres
);
if
(
hres
==
S_OK
)
{
ok
(
!
strcmp_w
(
sec
,
out_default
[
i
]),
"(%d) Got %s, expected %s
\n
"
,
i
,
wine_dbgstr_w
(
sec
),
wine_dbgstr_w
(
out_default
[
i
]));
CoTaskMemFree
(
sec
);
}
hres
=
CoInternetGetSecurityUrl
(
in
[
i
],
&
sec
,
PSU_SECURITY_URL_ONLY
,
0
);
ok
(
hres
==
S_OK
,
"(%d) CoInternetGetSecurityUrl returned: %08x
\n
"
,
i
,
hres
);
if
(
hres
==
S_OK
)
{
ok
(
!
strcmp_w
(
sec
,
out_securl
[
i
]),
"(%d) Got %s, expected %s
\n
"
,
i
,
wine_dbgstr_w
(
sec
),
wine_dbgstr_w
(
out_securl
[
i
]));
CoTaskMemFree
(
sec
);
}
}
}
START_TEST
(
sec_mgr
)
START_TEST
(
sec_mgr
)
{
{
OleInitialize
(
NULL
);
OleInitialize
(
NULL
);
test_InternetGetSecurityUrl
();
test_SecurityManager
();
test_SecurityManager
();
test_polices
();
test_polices
();
test_CoInternetCreateZoneManager
();
test_CoInternetCreateZoneManager
();
...
...
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