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
a91ed60f
Commit
a91ed60f
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: Introduce set_body_html helper.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
866880fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
dom.c
dlls/mshtml/tests/dom.c
+11
-11
No files found.
dlls/mshtml/tests/dom.c
View file @
a91ed60f
...
@@ -5092,6 +5092,14 @@ static IHTMLElement *_doc_get_body(unsigned line, IHTMLDocument2 *doc)
...
@@ -5092,6 +5092,14 @@ static IHTMLElement *_doc_get_body(unsigned line, IHTMLDocument2 *doc)
return
elem
;
return
elem
;
}
}
static
void
set_body_html
(
IHTMLDocument2
*
doc
,
const
char
*
html
)
{
IHTMLElement
*
body
;
body
=
doc_get_body
(
doc
);
test_elem_set_innerhtml
((
IUnknown
*
)
body
,
html
);
IHTMLElement_Release
(
body
);
}
#define test_create_elem(d,t) _test_create_elem(__LINE__,d,t)
#define test_create_elem(d,t) _test_create_elem(__LINE__,d,t)
static
IHTMLElement
*
_test_create_elem
(
unsigned
line
,
IHTMLDocument2
*
doc
,
const
char
*
tag
)
static
IHTMLElement
*
_test_create_elem
(
unsigned
line
,
IHTMLDocument2
*
doc
,
const
char
*
tag
)
{
{
...
@@ -9453,16 +9461,12 @@ static IHTMLElementCollection *_doc_get_elems_by_name(unsigned line, IHTMLDocume
...
@@ -9453,16 +9461,12 @@ static IHTMLElementCollection *_doc_get_elems_by_name(unsigned line, IHTMLDocume
static
void
test_elem_names
(
IHTMLDocument2
*
doc
)
static
void
test_elem_names
(
IHTMLDocument2
*
doc
)
{
{
IHTMLElementCollection
*
col
;
IHTMLElementCollection
*
col
;
IHTMLElement
*
body
;
LONG
len
;
LONG
len
;
HRESULT
hres
;
HRESULT
hres
;
static
const
elem_type_t
test1_types
[]
=
{
ET_INPUT
,
ET_A
,
ET_DIV
};
static
const
elem_type_t
test1_types
[]
=
{
ET_INPUT
,
ET_A
,
ET_DIV
};
body
=
doc_get_body
(
doc
);
set_body_html
(
doc
,
"<input name=
\"
test
\"
><a name=
\"
test
\"
></a><a name=
\"
xxx
\"
></a><div id=
\"
test
\"
></div>"
);
test_elem_set_innerhtml
((
IUnknown
*
)
body
,
"<input name=
\"
test
\"
><a name=
\"
test
\"
></a><a name=
\"
xxx
\"
></a><div id=
\"
test
\"
></div>"
);
col
=
doc_get_elems_by_name
(
doc
,
"test"
);
col
=
doc_get_elems_by_name
(
doc
,
"test"
);
test_elem_collection
((
IUnknown
*
)
col
,
test1_types
,
ARRAY_SIZE
(
test1_types
));
test_elem_collection
((
IUnknown
*
)
col
,
test1_types
,
ARRAY_SIZE
(
test1_types
));
IHTMLElementCollection_Release
(
col
);
IHTMLElementCollection_Release
(
col
);
...
@@ -9477,8 +9481,6 @@ static void test_elem_names(IHTMLDocument2 *doc)
...
@@ -9477,8 +9481,6 @@ static void test_elem_names(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"get_length failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_length failed: %08x
\n
"
,
hres
);
todo_wine
ok
(
len
==
1
,
"len = %d
\n
"
,
len
);
todo_wine
ok
(
len
==
1
,
"len = %d
\n
"
,
len
);
IHTMLElementCollection_Release
(
col
);
IHTMLElementCollection_Release
(
col
);
IHTMLElement_Release
(
body
);
}
}
static
void
test_elems2
(
IHTMLDocument2
*
doc
)
static
void
test_elems2
(
IHTMLDocument2
*
doc
)
...
@@ -9714,17 +9716,15 @@ static void test_svg_element(IHTMLDocument2 *doc, IHTMLElement *parent)
...
@@ -9714,17 +9716,15 @@ static void test_svg_element(IHTMLDocument2 *doc, IHTMLElement *parent)
static
void
test_dom_elements
(
IHTMLDocument2
*
doc
)
static
void
test_dom_elements
(
IHTMLDocument2
*
doc
)
{
{
IHTMLElement
*
body
,
*
div
;
IHTMLElement
*
div
;
body
=
doc_get_body
(
doc
);
set_body_html
(
doc
,
"<div id=
\"
parentdiv
\"
></div>"
);
test_elem_set_innerhtml
((
IUnknown
*
)
body
,
"<div id=
\"
parentdiv
\"
></div>"
);
div
=
get_doc_elem_by_id
(
doc
,
"parentdiv"
);
div
=
get_doc_elem_by_id
(
doc
,
"parentdiv"
);
test_textarea_element
(
doc
,
div
);
test_textarea_element
(
doc
,
div
);
test_form_element
(
doc
,
div
);
test_form_element
(
doc
,
div
);
test_svg_element
(
doc
,
div
);
test_svg_element
(
doc
,
div
);
IHTMLElement_Release
(
body
);
IHTMLElement_Release
(
div
);
IHTMLElement_Release
(
div
);
}
}
...
...
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