Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
785fb1d2
Commit
785fb1d2
authored
Nov 19, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Get rid of no longer needed Gecko checks in tests.
parent
b2ffe787
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
147 deletions
+13
-147
dom.c
dlls/mshtml/tests/dom.c
+1
-43
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+12
-64
script.c
dlls/mshtml/tests/script.c
+0
-40
No files found.
dlls/mshtml/tests/dom.c
View file @
785fb1d2
...
...
@@ -5917,10 +5917,8 @@ typedef void (*domtest_t)(IHTMLDocument2*);
static
void
run_domtest
(
const
char
*
str
,
domtest_t
test
)
{
IHTMLDocument2
*
doc
;
IHTMLElement
*
body
=
NULL
;
ULONG
ref
;
MSG
msg
;
HRESULT
hres
;
doc
=
create_doc_with_string
(
str
);
if
(
!
doc
)
...
...
@@ -5933,15 +5931,7 @@ static void run_domtest(const char *str, domtest_t test)
DispatchMessage
(
&
msg
);
}
hres
=
IHTMLDocument2_get_body
(
doc
,
&
body
);
ok
(
hres
==
S_OK
,
"get_body failed: %08x
\n
"
,
hres
);
if
(
body
)
{
IHTMLElement_Release
(
body
);
test
(
doc
);
}
else
{
skip
(
"Could not get document body. Assuming no Gecko installed.
\n
"
);
}
test
(
doc
);
ref
=
IHTMLDocument2_Release
(
doc
);
ok
(
!
ref
||
...
...
@@ -5949,39 +5939,8 @@ static void run_domtest(const char *str, domtest_t test)
"ref = %d
\n
"
,
ref
);
}
static
void
gecko_installer_workaround
(
BOOL
disable
)
{
HKEY
hkey
;
DWORD
res
;
static
BOOL
has_url
=
FALSE
;
static
char
url
[
2048
];
if
(
!
disable
&&
!
has_url
)
return
;
res
=
RegOpenKey
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
MSHTML"
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
if
(
disable
)
{
DWORD
type
,
size
=
sizeof
(
url
);
res
=
RegQueryValueEx
(
hkey
,
"GeckoUrl"
,
NULL
,
&
type
,
(
PVOID
)
url
,
&
size
);
if
(
res
==
ERROR_SUCCESS
&&
type
==
REG_SZ
)
has_url
=
TRUE
;
RegDeleteValue
(
hkey
,
"GeckoUrl"
);
}
else
{
RegSetValueEx
(
hkey
,
"GeckoUrl"
,
0
,
REG_SZ
,
(
PVOID
)
url
,
lstrlenA
(
url
)
+
1
);
}
RegCloseKey
(
hkey
);
}
START_TEST
(
dom
)
{
gecko_installer_workaround
(
TRUE
);
CoInitialize
(
NULL
);
run_domtest
(
doc_str1
,
test_doc_elem
);
...
...
@@ -6001,5 +5960,4 @@ START_TEST(dom)
run_domtest
(
frameset_str
,
test_frameset
);
CoUninitialize
();
gecko_installer_workaround
(
FALSE
);
}
dlls/mshtml/tests/htmldoc.c
View file @
785fb1d2
...
...
@@ -184,7 +184,6 @@ static const WCHAR about_blank_url[] = {'a','b','o','u','t',':','b','l','a','n',
static
HRESULT
QueryInterface
(
REFIID
riid
,
void
**
ppv
);
static
void
test_MSHTML_QueryStatus
(
IUnknown
*
,
DWORD
);
static
BOOL
nogecko
=
FALSE
;
#define test_readyState(u) _test_readyState(__LINE__,u)
static
void
_test_readyState
(
unsigned
,
IUnknown
*
);
...
...
@@ -2919,26 +2918,12 @@ static void test_download(DWORD flags)
if
(
flags
&
DWL_TRYCSS
)
SET_CALLED
(
Exec_ShellDocView_84
);
if
(
flags
&
DWL_CSS
)
{
if
(
called_CreateInstance
)
{
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
Start
);
CHECK_CALLED
(
LockRequest
);
CHECK_CALLED
(
Terminate
);
CHECK_CALLED
(
Protocol_Read
);
CHECK_CALLED
(
UnlockRequest
);
}
else
{
skip
(
"CreateInstance not called. Assuming no Gecko installed.
\n
"
);
SET_CALLED
(
Exec_ShellDocView_84
);
SET_CALLED
(
CreateInstance
);
SET_CALLED
(
Start
);
SET_CALLED
(
LockRequest
);
SET_CALLED
(
Terminate
);
SET_CALLED
(
Protocol_Read
);
SET_CALLED
(
UnlockRequest
);
nogecko
=
TRUE
;
}
CHECK_CALLED
(
CreateInstance
);
CHECK_CALLED
(
Start
);
CHECK_CALLED
(
LockRequest
);
CHECK_CALLED
(
Terminate
);
CHECK_CALLED
(
Protocol_Read
);
CHECK_CALLED
(
UnlockRequest
);
}
SET_CALLED
(
Exec_Explorer_69
);
SET_CALLED
(
EnableModeless_TRUE
);
/* IE7 */
...
...
@@ -3327,13 +3312,12 @@ static void test_exec_fontname(IUnknown *unk, LPCWSTR name, LPCWSTR exname)
}
hres
=
IOleCommandTarget_Exec
(
cmdtrg
,
&
CGID_MSHTML
,
IDM_FONTNAME
,
0
,
in
,
out
);
if
(
!
nogecko
)
ok
(
hres
==
S_OK
,
"Exec(IDM_FONTNAME) failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"Exec(IDM_FONTNAME) failed: %08x
\n
"
,
hres
);
if
(
in
)
VariantClear
(
in
);
if
(
out
&&
!
nogecko
)
{
if
(
out
)
{
ok
(
V_VT
(
out
)
==
VT_BSTR
,
"V_VT(out) = %x
\n
"
,
V_VT
(
out
));
if
(
V_VT
(
out
)
==
VT_BSTR
)
{
if
(
exname
)
...
...
@@ -4300,17 +4284,15 @@ static void test_editing_mode(BOOL do_load)
test_exec_noargs
(
unk
,
IDM_JUSTIFYRIGHT
);
test_timer
(
EXPECT_UPDATEUI
);
if
(
!
nogecko
)
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYRIGHT
,
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
|
OLECMDF_LATCHED
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYRIGHT
,
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
|
OLECMDF_LATCHED
);
test_exec_noargs
(
unk
,
IDM_JUSTIFYCENTER
);
test_timer
(
EXPECT_UPDATEUI
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYRIGHT
,
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
);
if
(
!
nogecko
)
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYCENTER
,
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
|
OLECMDF_LATCHED
);
test_QueryStatus
(
unk
,
&
CGID_MSHTML
,
IDM_JUSTIFYCENTER
,
OLECMDF_SUPPORTED
|
OLECMDF_ENABLED
|
OLECMDF_LATCHED
);
test_exec_noargs
(
unk
,
IDM_HORIZONTALLINE
);
test_timer
(
EXPECT_UPDATEUI
);
...
...
@@ -4348,36 +4330,6 @@ static void register_protocol(void)
IInternetSession_Release
(
session
);
}
static
void
gecko_installer_workaround
(
BOOL
disable
)
{
HKEY
hkey
;
DWORD
res
;
static
BOOL
has_url
=
FALSE
;
static
char
url
[
2048
];
if
(
!
disable
&&
!
has_url
)
return
;
res
=
RegOpenKey
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
MSHTML"
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
if
(
disable
)
{
DWORD
type
,
size
=
sizeof
(
url
);
res
=
RegQueryValueEx
(
hkey
,
"GeckoUrl"
,
NULL
,
&
type
,
(
PVOID
)
url
,
&
size
);
if
(
res
==
ERROR_SUCCESS
&&
type
==
REG_SZ
)
has_url
=
TRUE
;
RegDeleteValue
(
hkey
,
"GeckoUrl"
);
}
else
{
RegSetValueEx
(
hkey
,
"GeckoUrl"
,
0
,
REG_SZ
,
(
PVOID
)
url
,
lstrlenA
(
url
)
+
1
);
}
RegCloseKey
(
hkey
);
}
static
void
test_HTMLDoc_ISupportErrorInfo
(
void
)
{
HRESULT
hres
;
...
...
@@ -4425,8 +4377,6 @@ static void test_IPersistHistory(void)
START_TEST
(
htmldoc
)
{
gecko_installer_workaround
(
TRUE
);
CoInitialize
(
NULL
);
container_hwnd
=
create_container_window
();
register_protocol
();
...
...
@@ -4445,6 +4395,4 @@ START_TEST(htmldoc)
DestroyWindow
(
container_hwnd
);
CoUninitialize
();
gecko_installer_workaround
(
FALSE
);
}
dlls/mshtml/tests/script.c
View file @
785fb1d2
...
...
@@ -516,7 +516,6 @@ static IHTMLDocument2 *create_and_load_doc(const char *str)
{
IHTMLDocument2
*
doc
;
IHTMLElement
*
body
=
NULL
;
ULONG
ref
;
MSG
msg
;
HRESULT
hres
;
static
const
WCHAR
ucPtr
[]
=
{
'b'
,
'a'
,
'c'
,
'k'
,
'g'
,
'r'
,
'o'
,
'u'
,
'n'
,
'd'
,
0
};
...
...
@@ -535,13 +534,6 @@ static IHTMLDocument2 *create_and_load_doc(const char *str)
hres
=
IHTMLDocument2_get_body
(
doc
,
&
body
);
ok
(
hres
==
S_OK
,
"get_body failed: %08x
\n
"
,
hres
);
if
(
!
body
)
{
skip
(
"Could not get document body. Assuming no Gecko installed.
\n
"
);
ref
=
IHTMLDocument2_Release
(
doc
);
ok
(
!
ref
,
"ref = %d
\n
"
,
ref
);
return
NULL
;
}
/* Check we can query for function on the IHTMLElementBody interface */
name
=
(
WCHAR
*
)
ucPtr
;
hres
=
IHTMLElement_GetIDsOfNames
(
body
,
&
IID_NULL
,
&
name
,
1
,
LOCALE_USER_DEFAULT
,
&
dispID
);
...
...
@@ -1618,39 +1610,8 @@ static BOOL register_script_engine(void)
return
TRUE
;
}
static
void
gecko_installer_workaround
(
BOOL
disable
)
{
HKEY
hkey
;
DWORD
res
;
static
BOOL
has_url
=
FALSE
;
static
char
url
[
2048
];
if
(
!
disable
&&
!
has_url
)
return
;
res
=
RegOpenKey
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
MSHTML"
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
if
(
disable
)
{
DWORD
type
,
size
=
sizeof
(
url
);
res
=
RegQueryValueEx
(
hkey
,
"GeckoUrl"
,
NULL
,
&
type
,
(
PVOID
)
url
,
&
size
);
if
(
res
==
ERROR_SUCCESS
&&
type
==
REG_SZ
)
has_url
=
TRUE
;
RegDeleteValue
(
hkey
,
"GeckoUrl"
);
}
else
{
RegSetValueEx
(
hkey
,
"GeckoUrl"
,
0
,
REG_SZ
,
(
PVOID
)
url
,
lstrlenA
(
url
)
+
1
);
}
RegCloseKey
(
hkey
);
}
START_TEST
(
script
)
{
gecko_installer_workaround
(
TRUE
);
CoInitialize
(
NULL
);
if
(
winetest_interactive
||
!
is_ie_hardened
())
{
...
...
@@ -1665,5 +1626,4 @@ START_TEST(script)
}
CoUninitialize
();
gecko_installer_workaround
(
FALSE
);
}
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