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
d7a4f0eb
Commit
d7a4f0eb
authored
Mar 18, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Fixed sec_mgr.c tests failing on some recent Windows.
parent
c4f935d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
sec_mgr.c
dlls/urlmon/tests/sec_mgr.c
+31
-5
No files found.
dlls/urlmon/tests/sec_mgr.c
View file @
d7a4f0eb
...
...
@@ -65,6 +65,11 @@
expect_ ## func = called_ ## func = FALSE; \
}while(0)
#define SET_CALLED(func) \
do { \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
DEFINE_EXPECT
(
ParseUrl_SECURITY_URL_input
);
DEFINE_EXPECT
(
ParseUrl_SECURITY_URL_input2
);
DEFINE_EXPECT
(
ParseUrl_SECURITY_URL_expected
);
...
...
@@ -509,15 +514,26 @@ static void test_url_action(IInternetSecurityManager *secmgr, IInternetZoneManag
*/
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Internet Settings
\\
Zones
\\
3"
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
{
ok
(
0
,
"Could not open zone key
\n
"
);
ok
(
res
==
ERROR_SUCCESS
,
"Could not open zone key
\n
"
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
}
wsprintfA
(
buf
,
"%X"
,
action
);
size
=
sizeof
(
DWORD
);
res
=
RegQueryValueExA
(
hkey
,
buf
,
NULL
,
NULL
,
(
BYTE
*
)
&
reg_policy
,
&
size
);
RegCloseKey
(
hkey
);
/* Try settings from HKEY_LOCAL_MACHINE. */
if
(
res
!=
ERROR_SUCCESS
||
size
!=
sizeof
(
DWORD
))
{
res
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Internet Settings
\\
Zones
\\
3"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"Could not open zone key
\n
"
);
size
=
sizeof
(
DWORD
);
res
=
RegQueryValueExA
(
hkey
,
buf
,
NULL
,
NULL
,
(
BYTE
*
)
&
reg_policy
,
&
size
);
RegCloseKey
(
hkey
);
}
if
(
res
!=
ERROR_SUCCESS
||
size
!=
sizeof
(
DWORD
))
{
policy
=
0xdeadbeef
;
hres
=
IInternetSecurityManager_ProcessUrlAction
(
secmgr
,
url9
,
action
,
(
BYTE
*
)
&
policy
,
...
...
@@ -1213,10 +1229,10 @@ static void test_GetZoneAttributes(void)
ok
((
pZA
->
cbSize
==
0xffffffff
)
||
(
pZA
->
cbSize
==
sizeof
(
ZONEATTRIBUTES
)),
"got cbSize = 0x%x (expected 0xffffffff)
\n
"
,
pZA
->
cbSize
);
/* IE8
no longer
fail on invalid zones */
/* IE8
up to IE10 don't
fail on invalid zones */
memset
(
buffer
,
-
1
,
sizeof
(
buffer
));
hr
=
IInternetZoneManager_GetZoneAttributes
(
zonemgr
,
0xdeadbeef
,
pZA
);
ok
(
hr
==
S_OK
||
(
hr
==
E_FAIL
)
,
ok
(
hr
==
S_OK
||
hr
==
E_FAIL
||
hr
==
E_POINTER
,
"got 0x%x (expected S_OK or E_FAIL)
\n
"
,
hr
);
hr
=
IInternetZoneManager_GetZoneAttributes
(
zonemgr
,
0
,
NULL
);
...
...
@@ -1958,6 +1974,16 @@ static void test_CoInternetIsFeatureZoneElevationEnabled(void)
testcases
[
i
].
policy_flags
=
URLPOLICY_ALLOW
;
}
/* IE10 does not seem to use passed ISecurityManager */
SET_EXPECT
(
ProcessUrlAction
);
pCoInternetIsFeatureZoneElevationEnabled
(
url1
,
url1
,
&
security_manager
,
0
);
i
=
called_ProcessUrlAction
;
SET_CALLED
(
ProcessUrlAction
);
if
(
!
i
)
{
skip
(
"CoInternetIsFeatureZoneElevationEnabled does not use passed ISecurityManager
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
testcases
)
/
sizeof
(
testcases
[
0
]);
i
++
)
{
url_from
=
a2w
(
testcases
[
i
].
url_from
);
url_to
=
a2w
(
testcases
[
i
].
url_to
);
...
...
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