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
73b3d35d
Commit
73b3d35d
authored
Sep 23, 2009
by
Ge van Geldorp
Committed by
Alexandre Julliard
Sep 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Fix htmldoc test on Windows Server and Win7.
parent
9cb140c4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
48 deletions
+64
-48
dom.c
dlls/mshtml/tests/dom.c
+1
-21
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+23
-5
mshtml_test.h
dlls/mshtml/tests/mshtml_test.h
+38
-0
script.c
dlls/mshtml/tests/script.c
+1
-21
sec_mgr.c
dlls/urlmon/tests/sec_mgr.c
+1
-1
No files found.
dlls/mshtml/tests/dom.c
View file @
73b3d35d
...
...
@@ -31,6 +31,7 @@
#include "mshtmhst.h"
#include "docobj.h"
#include "dispex.h"
#include "mshtml_test.h"
static
const
char
doc_blank
[]
=
"<html></html>"
;
static
const
char
doc_str1
[]
=
"<html><body>test</body></html>"
;
...
...
@@ -5394,27 +5395,6 @@ static void gecko_installer_workaround(BOOL disable)
RegCloseKey
(
hkey
);
}
/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */
/* Note: this code is duplicated in dlls/mshtml/tests/dom.c, dlls/mshtml/tests/script.c and dlls/urlmon/tests/sec_mgr.c */
static
BOOL
is_ie_hardened
(
void
)
{
HKEY
zone_map
;
DWORD
ie_harden
,
type
,
size
;
ie_harden
=
0
;
if
(
RegOpenKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Internet Settings
\\
ZoneMap"
,
0
,
KEY_QUERY_VALUE
,
&
zone_map
)
==
ERROR_SUCCESS
)
{
size
=
sizeof
(
DWORD
);
if
(
RegQueryValueEx
(
zone_map
,
"IEHarden"
,
NULL
,
&
type
,
(
LPBYTE
)
&
ie_harden
,
&
size
)
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
{
ie_harden
=
0
;
}
RegCloseKey
(
zone_map
);
}
return
ie_harden
!=
0
;
}
START_TEST
(
dom
)
{
gecko_installer_workaround
(
TRUE
);
...
...
dlls/mshtml/tests/htmldoc.c
View file @
73b3d35d
...
...
@@ -37,6 +37,7 @@
#include "idispids.h"
#include "shlguid.h"
#include "perhist.h"
#include "mshtml_test.h"
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
DEFINE_GUID
(
IID_IProxyManager
,
0x00000008
,
0x0000
,
0x0000
,
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
...
...
@@ -104,6 +105,7 @@ DEFINE_EXPECT(Exec_ShellDocView_37);
DEFINE_EXPECT
(
Exec_ShellDocView_84
);
DEFINE_EXPECT
(
Exec_ShellDocView_103
);
DEFINE_EXPECT
(
Exec_ShellDocView_105
);
DEFINE_EXPECT
(
Exec_ShellDocView_140
);
DEFINE_EXPECT
(
Exec_UPDATECOMMANDS
);
DEFINE_EXPECT
(
Exec_SETTITLE
);
DEFINE_EXPECT
(
Exec_HTTPEQUIV
);
...
...
@@ -2310,6 +2312,14 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
return
E_NOTIMPL
;
case
140
:
CHECK_EXPECT2
(
Exec_ShellDocView_140
);
ok
(
pvaIn
==
NULL
,
"pvaIn != NULL
\n
"
);
ok
(
pvaOut
==
NULL
,
"pvaOut != NULL
\n
"
);
return
E_NOTIMPL
;
default:
ok
(
0
,
"unexpected command %d
\n
"
,
nCmdID
);
return
E_FAIL
;
...
...
@@ -2499,9 +2509,10 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
static
IServiceProvider
ServiceProvider
=
{
&
ServiceProviderVtbl
};
DEFINE_GUID
(
IID_unk1
,
0xD48A6EC6
,
0x6A4A
,
0x11CF
,
0x94
,
0xA7
,
0x44
,
0x45
,
0x53
,
0x54
,
0x00
,
0x00
);
/* HTMLWindow2 ? */
DEFINE_GUID
(
IID_
unk2
,
0x7BB0B520
,
0xB1A7
,
0x11D2
,
0xBB
,
0x23
,
0x00
,
0xC0
,
0x4F
,
0x79
,
0xAB
,
0xCD
);
DEFINE_GUID
(
IID_
unk3
,
0x000670BA
,
0x0000
,
0x0000
,
0xC0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
DEFINE_GUID
(
IID_
IThumbnailView
,
0x7BB0B520
,
0xB1A7
,
0x11D2
,
0xBB
,
0x23
,
0x00
,
0xC0
,
0x4F
,
0x79
,
0xAB
,
0xCD
);
DEFINE_GUID
(
IID_
IRenMailEditor
,
0x000670BA
,
0x0000
,
0x0000
,
0xC0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
DEFINE_GUID
(
IID_unk4
,
0x305104a6
,
0x98b5
,
0x11cf
,
0xbb
,
0x82
,
0x00
,
0xaa
,
0x00
,
0xbd
,
0xce
,
0x0b
);
DEFINE_GUID
(
IID_IDocHostUIHandlerPriv
,
0xf0d241d1
,
0x5d0e
,
0x4e85
,
0xbc
,
0xb4
,
0xfa
,
0xd7
,
0xf7
,
0xc5
,
0x52
,
0x8c
);
static
HRESULT
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -2533,12 +2544,14 @@ static HRESULT QueryInterface(REFIID riid, void **ppv)
return
E_NOINTERFACE
;
/* ? */
else
if
(
IsEqualGUID
(
&
IID_unk1
,
riid
))
return
E_NOINTERFACE
;
/* HTMLWindow2 ? */
else
if
(
IsEqualGUID
(
&
IID_
unk2
,
riid
))
else
if
(
IsEqualGUID
(
&
IID_
IThumbnailView
,
riid
))
return
E_NOINTERFACE
;
/* ? */
else
if
(
IsEqualGUID
(
&
IID_
unk3
,
riid
))
else
if
(
IsEqualGUID
(
&
IID_
IRenMailEditor
,
riid
))
return
E_NOINTERFACE
;
/* ? */
else
if
(
IsEqualGUID
(
&
IID_unk4
,
riid
))
return
E_NOINTERFACE
;
/* ? */
else
if
(
IsEqualGUID
(
&
IID_IDocHostUIHandlerPriv
,
riid
))
return
E_NOINTERFACE
;
/* ? */
else
ok
(
0
,
"unexpected riid %s
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -2811,6 +2824,7 @@ static void test_download(DWORD flags)
SET_EXPECT
(
Exec_SETDOWNLOADSTATE_0
);
SET_EXPECT
(
Exec_ShellDocView_103
);
SET_EXPECT
(
Exec_ShellDocView_105
);
SET_EXPECT
(
Exec_ShellDocView_140
);
SET_EXPECT
(
Exec_MSHTML_PARSECOMPLETE
);
SET_EXPECT
(
Exec_HTTPEQUIV_DONE
);
SET_EXPECT
(
SetStatusText
);
...
...
@@ -2870,6 +2884,7 @@ static void test_download(DWORD flags)
CHECK_CALLED
(
Exec_SETDOWNLOADSTATE_0
);
SET_CALLED
(
Exec_ShellDocView_103
);
SET_CALLED
(
Exec_ShellDocView_105
);
SET_CALLED
(
Exec_ShellDocView_140
);
CHECK_CALLED
(
Exec_MSHTML_PARSECOMPLETE
);
CHECK_CALLED
(
Exec_HTTPEQUIV_DONE
);
SET_CALLED
(
SetStatusText
);
...
...
@@ -4030,7 +4045,10 @@ static void test_HTMLDocument_http(void)
return
;
}
test_download
(
DWL_HTTP
);
if
(
winetest_interactive
||
!
is_ie_hardened
())
test_download
(
DWL_HTTP
);
else
win_skip
(
"IE running in Enhanced Security Configuration
\n
"
);
test_IsDirty
(
unk
,
S_FALSE
);
test_MSHTML_QueryStatus
(
unk
,
OLECMDF_SUPPORTED
);
...
...
dlls/mshtml/tests/mshtml_test.h
0 → 100644
View file @
73b3d35d
/*
* Copyright 2009 Ge van Geldorp
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */
/* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */
static
BOOL
is_ie_hardened
(
void
)
{
HKEY
zone_map
;
DWORD
ie_harden
,
type
,
size
;
ie_harden
=
0
;
if
(
RegOpenKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Internet Settings
\\
ZoneMap"
,
0
,
KEY_QUERY_VALUE
,
&
zone_map
)
==
ERROR_SUCCESS
)
{
size
=
sizeof
(
DWORD
);
if
(
RegQueryValueEx
(
zone_map
,
"IEHarden"
,
NULL
,
&
type
,
(
LPBYTE
)
&
ie_harden
,
&
size
)
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
{
ie_harden
=
0
;
}
RegCloseKey
(
zone_map
);
}
return
ie_harden
!=
0
;
}
dlls/mshtml/tests/script.c
View file @
73b3d35d
...
...
@@ -33,6 +33,7 @@
#include "activdbg.h"
#include "objsafe.h"
#include "mshtmdid.h"
#include "mshtml_test.h"
DEFINE_GUID
(
CLSID_IdentityUnmarshal
,
0x0000001b
,
0x0000
,
0x0000
,
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
...
...
@@ -1404,27 +1405,6 @@ static void gecko_installer_workaround(BOOL disable)
RegCloseKey
(
hkey
);
}
/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */
/* Note: this code is duplicated in dlls/mshtml/tests/dom.c, dlls/mshtml/tests/script.c and dlls/urlmon/tests/sec_mgr.c */
static
BOOL
is_ie_hardened
(
void
)
{
HKEY
zone_map
;
DWORD
ie_harden
,
type
,
size
;
ie_harden
=
0
;
if
(
RegOpenKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Internet Settings
\\
ZoneMap"
,
0
,
KEY_QUERY_VALUE
,
&
zone_map
)
==
ERROR_SUCCESS
)
{
size
=
sizeof
(
DWORD
);
if
(
RegQueryValueEx
(
zone_map
,
"IEHarden"
,
NULL
,
&
type
,
(
LPBYTE
)
&
ie_harden
,
&
size
)
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
{
ie_harden
=
0
;
}
RegCloseKey
(
zone_map
);
}
return
ie_harden
!=
0
;
}
START_TEST
(
script
)
{
gecko_installer_workaround
(
TRUE
);
...
...
dlls/urlmon/tests/sec_mgr.c
View file @
73b3d35d
...
...
@@ -168,7 +168,7 @@ static void test_SecurityManager(void)
}
/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */
/* Note: this code is duplicated in dlls/mshtml/tests/
dom.c, dlls/mshtml/tests/script.c
and dlls/urlmon/tests/sec_mgr.c */
/* Note: this code is duplicated in dlls/mshtml/tests/
mshtml_test.h
and dlls/urlmon/tests/sec_mgr.c */
static
BOOL
is_ie_hardened
(
void
)
{
HKEY
zone_map
;
...
...
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