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
1c1f8e20
Commit
1c1f8e20
authored
Jul 11, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement2::getElementsByTagName tests.
parent
952a54cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
dom.c
dlls/mshtml/tests/dom.c
+33
-1
No files found.
dlls/mshtml/tests/dom.c
View file @
1c1f8e20
...
...
@@ -841,7 +841,7 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLElementCollection
,
(
void
**
)
&
col
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLElementCollection: %08x
\n
"
,
hres
);
ok
_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLElementCollection: %08x
\n
"
,
hres
);
test_disp
((
IUnknown
*
)
col
,
&
DIID_DispHTMLElementCollection
);
...
...
@@ -883,6 +883,34 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
IHTMLElementCollection_Release
(
col
);
}
#define test_elem_getelembytag(u,t,l) _test_elem_getelembytag(__LINE__,u,t,l)
static
void
_test_elem_getelembytag
(
unsigned
line
,
IUnknown
*
unk
,
elem_type_t
type
,
long
exlen
)
{
IHTMLElement2
*
elem
=
_get_elem2_iface
(
line
,
unk
);
IHTMLElementCollection
*
col
=
NULL
;
elem_type_t
*
types
=
NULL
;
BSTR
tmp
;
int
i
;
HRESULT
hres
;
tmp
=
a2bstr
(
elem_type_infos
[
type
].
tag
);
hres
=
IHTMLElement2_getElementsByTagName
(
elem
,
tmp
,
&
col
);
SysFreeString
(
tmp
);
IHTMLElement2_Release
(
elem
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"getElementByTagName failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
col
!=
NULL
,
"col == NULL
\n
"
);
if
(
exlen
)
{
types
=
HeapAlloc
(
GetProcessHeap
(),
0
,
exlen
*
sizeof
(
elem_type_t
));
for
(
i
=
0
;
i
<
exlen
;
i
++
)
types
[
i
]
=
type
;
}
_test_elem_collection
(
line
,
(
IUnknown
*
)
col
,
types
,
exlen
);
HeapFree
(
GetProcessHeap
(),
0
,
types
);
}
#define get_first_child(n) _get_first_child(__LINE__,n)
static
IHTMLDOMNode
*
_get_first_child
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -2146,6 +2174,10 @@ static void test_elems(IHTMLDocument2 *doc)
IHTMLDOMNode_Release
(
node
);
ok
(
node2
==
NULL
,
"node != NULL
\n
"
);
test_elem_getelembytag
((
IUnknown
*
)
elem
,
ET_OPTION
,
2
);
test_elem_getelembytag
((
IUnknown
*
)
elem
,
ET_SELECT
,
0
);
test_elem_getelembytag
((
IUnknown
*
)
elem
,
ET_HTML
,
0
);
IHTMLElement_Release
(
elem
);
}
...
...
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