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
e35a8436
Commit
e35a8436
authored
Mar 31, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement::outerText tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7c1fa88c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
dom.c
dlls/mshtml/tests/dom.c
+53
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
e35a8436
...
...
@@ -2804,6 +2804,44 @@ static void _test_elem_set_innertext(unsigned line, IHTMLElement *elem, const ch
}
#define test_elem_outertext(e,t) _test_elem_outertext(__LINE__,e,t)
static
void
_test_elem_outertext
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
extext
)
{
BSTR
text
=
NULL
;
HRESULT
hres
;
hres
=
IHTMLElement_get_outerText
(
elem
,
&
text
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_outerText failed: %08x
\n
"
,
hres
);
if
(
extext
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
text
,
extext
),
"get_outerText returned %s expected %s
\n
"
,
wine_dbgstr_w
(
text
),
extext
);
else
ok_
(
__FILE__
,
line
)
(
!
text
,
"get_outerText returned %s expected NULL
\n
"
,
wine_dbgstr_w
(
text
));
SysFreeString
(
text
);
}
#define test_elem_set_outertext(e,t) _test_elem_set_outertext(__LINE__,e,t)
static
void
_test_elem_set_outertext
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
text
)
{
BSTR
str
=
a2bstr
(
text
);
HRESULT
hres
;
hres
=
IHTMLElement_put_outerText
(
elem
,
str
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_outerText failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
}
#define test_elem_set_outertext_fail(a) _test_elem_set_outertext_fail(__LINE__,a)
static
void
_test_elem_set_outertext_fail
(
unsigned
line
,
IHTMLElement
*
elem
)
{
BSTR
str
=
a2bstr
(
"test"
);
HRESULT
hres
;
hres
=
IHTMLElement_put_outerText
(
elem
,
str
);
ok_
(
__FILE__
,
line
)
(
hres
==
0x800a0258
,
"put_outerText failed: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
}
#define test_elem_innerhtml(e,t) _test_elem_innerhtml(__LINE__,e,t)
static
void
_test_elem_innerhtml
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
inner_html
)
{
...
...
@@ -6315,6 +6353,7 @@ static void test_doc_elem(IHTMLDocument2 *doc)
test_node_name
((
IUnknown
*
)
elem
,
"HTML"
);
test_elem_tag
((
IUnknown
*
)
elem
,
"HTML"
);
todo_wine
test_elem_set_outertext_fail
(
elem
);
doc_node
=
get_doc_node
(
doc
);
owner_doc
=
get_owner_doc
((
IUnknown
*
)
elem
);
...
...
@@ -6727,6 +6766,8 @@ static void test_defaults(IHTMLDocument2 *doc)
test_body_funs
(
body
);
IHTMLBodyElement_Release
(
body
);
test_elem_set_outertext_fail
(
elem
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
hres
=
IHTMLElement_get_style
(
elem
,
&
style
);
...
...
@@ -8911,6 +8952,18 @@ static void test_elems2(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem2
);
}
test_elem_set_innerhtml
((
IUnknown
*
)
div
,
"<div id=
\"
elemid
\"
>test</div>"
);
elem
=
get_elem_by_id
(
doc
,
"elemid"
,
TRUE
);
if
(
elem
)
{
test_elem_outertext
(
elem
,
"test"
);
test_elem_set_outertext
(
elem
,
"outer text"
);
test_elem_outertext
(
elem
,
NULL
);
test_elem_all
((
IUnknown
*
)
div
,
NULL
,
0
);
elem2
=
test_elem_get_parent
((
IUnknown
*
)
elem
);
ok
(
!
elem2
,
"parent != NULL
\n
"
);
IHTMLElement_Release
(
elem
);
}
test_attr
(
doc
,
div
);
test_blocked
(
doc
,
div
);
test_elem_names
(
doc
);
...
...
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