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
866880fb
Commit
866880fb
authored
Jul 01, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Fix comment tests on recent IE versions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa58676a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
dom.c
dlls/mshtml/tests/dom.c
+19
-5
No files found.
dlls/mshtml/tests/dom.c
View file @
866880fb
...
...
@@ -567,11 +567,16 @@ static const elem_type_info_t elem_type_infos[] = {
{
"tspan"
,
tspan_iids
,
NULL
}
};
static
int
strncmp_wa
(
LPCWSTR
strw
,
const
char
*
stra
,
size_t
len
)
{
WCHAR
buf
[
512
];
size_t
wlen
=
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
len
,
buf
,
sizeof
(
buf
));
return
wlen
==
len
&&
memcmp
(
strw
,
buf
,
len
*
sizeof
(
WCHAR
));
}
static
int
strcmp_wa
(
LPCWSTR
strw
,
const
char
*
stra
)
{
CHAR
buf
[
512
];
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
);
return
lstrcmpA
(
stra
,
buf
);
return
strncmp_wa
(
strw
,
stra
,
strlen
(
stra
));
}
static
BOOL
is_prefix_wa
(
const
WCHAR
*
strw
,
const
char
*
prefix
)
...
...
@@ -2033,12 +2038,16 @@ static IHTMLFormElement *_get_textarea_form(unsigned line, IUnknown *unk)
static
void
_test_comment_text
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
extext
)
{
IHTMLCommentElement
*
comment
=
_get_comment_iface
(
__LINE__
,
unk
);
const
char
*
p
;
BSTR
text
;
HRESULT
hres
;
hres
=
IHTMLCommentElement_get_text
(
comment
,
&
text
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_text failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
text
,
extext
),
"text =
\"
%s
\"
, expected
\"
%s
\"\n
"
,
wine_dbgstr_w
(
text
),
extext
);
if
((
p
=
strstr
(
extext
,
"-->"
))
&&
SysStringLen
(
text
)
==
p
-
extext
)
/* Some IEs drop comment ending */
ok_
(
__FILE__
,
line
)(
!
strncmp_wa
(
text
,
extext
,
p
-
extext
),
"text =
\"
%s
\"
, expected
\"
%s
\"\n
"
,
wine_dbgstr_w
(
text
),
extext
);
else
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
text
,
extext
),
"text =
\"
%s
\"
, expected
\"
%s
\"\n
"
,
wine_dbgstr_w
(
text
),
extext
);
IHTMLCommentElement_Release
(
comment
);
SysFreeString
(
text
);
...
...
@@ -3050,12 +3059,17 @@ static void _test_elem_set_outerhtml(unsigned line, IUnknown *unk, const char *o
static
void
_test_elem_outerhtml
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
outer_html
)
{
IHTMLElement
*
elem
=
_get_elem_iface
(
line
,
unk
);
const
char
*
p
;
BSTR
html
;
HRESULT
hres
;
hres
=
IHTMLElement_get_outerHTML
(
elem
,
&
html
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_outerHTML failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
html
,
outer_html
),
"outerHTML = '%s', expected '%s'
\n
"
,
wine_dbgstr_w
(
html
),
outer_html
);
if
((
p
=
strstr
(
outer_html
,
"-->"
))
&&
!
p
[
3
]
&&
SysStringLen
(
html
)
==
p
-
outer_html
)
/* Some IEs drop comment ending */
ok_
(
__FILE__
,
line
)(
!
strncmp_wa
(
html
,
outer_html
,
p
-
outer_html
),
"text =
\"
%s
\"
, expected
\"
%s
\"\n
"
,
wine_dbgstr_w
(
html
),
outer_html
);
else
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
html
,
outer_html
),
"outerHTML = '%s', expected '%s'
\n
"
,
wine_dbgstr_w
(
html
),
outer_html
);
IHTMLElement_Release
(
elem
);
SysFreeString
(
html
);
...
...
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