Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tayshawnna Jackson
wine
Commits
d7a4f0eb
Commit
d7a4f0eb
authored
11 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
urlmon: Fixed sec_mgr.c tests failing on some recent Windows.
parent
c4f935d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/urlmon/tests/sec_mgr.c
+31
-5
31 additions, 5 deletions
dlls/urlmon/tests/sec_mgr.c
with
31 additions
and
5 deletions
dlls/urlmon/tests/sec_mgr.c
+
31
−
5
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment