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
12dc23db
Commit
12dc23db
authored
Apr 22, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDOMChildrenCollection::get__newEnum tests.
parent
570d05ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
dom.c
dlls/mshtml/tests/dom.c
+56
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
12dc23db
...
...
@@ -6242,7 +6242,55 @@ static void test_child_col_disp(IHTMLDOMChildrenCollection *col)
IDispatchEx_Release
(
dispex
);
}
static
void
test_enum_children
(
IUnknown
*
unk
,
unsigned
len
)
{
IEnumVARIANT
*
enum_var
;
ULONG
i
,
fetched
;
VARIANT
v
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IEnumVARIANT
,
(
void
**
)
&
enum_var
);
ok
(
hres
==
S_OK
,
"Could not get IEnumVARIANT iface: %08x
\n
"
,
hres
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
fetched
=
0
;
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IEnumVARIANT_Next
(
enum_var
,
1
,
&
v
,
i
?
&
fetched
:
NULL
);
ok
(
hres
==
S_OK
,
"Next failed: %08x
\n
"
,
hres
);
if
(
i
)
ok
(
fetched
==
1
,
"fetched = %d
\n
"
,
fetched
);
ok
(
V_VT
(
&
v
)
==
VT_DISPATCH
&&
V_DISPATCH
(
&
v
),
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
IDispatch_Release
(
V_DISPATCH
(
&
v
));
}
fetched
=
0xdeadbeef
;
V_VT
(
&
v
)
=
VT_BOOL
;
hres
=
IEnumVARIANT_Next
(
enum_var
,
1
,
&
v
,
&
fetched
);
ok
(
hres
==
S_FALSE
,
"Next returned %08x, expected S_FALSE
\n
"
,
hres
);
ok
(
fetched
==
0
,
"fetched = %d
\n
"
,
fetched
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
hres
=
IEnumVARIANT_Reset
(
enum_var
);
ok
(
hres
==
S_OK
,
"Reset failed: %08x
\n
"
,
hres
);
fetched
=
0xdeadbeef
;
V_VT
(
&
v
)
=
VT_BOOL
;
hres
=
IEnumVARIANT_Next
(
enum_var
,
0
,
&
v
,
&
fetched
);
ok
(
hres
==
S_OK
,
"Next returned %08x, expected S_FALSE
\n
"
,
hres
);
ok
(
fetched
==
0
,
"fetched = %d
\n
"
,
fetched
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
hres
=
IEnumVARIANT_Skip
(
enum_var
,
len
>
2
?
len
-
2
:
0
);
ok
(
hres
==
S_OK
,
"Skip failed: %08x
\n
"
,
hres
);
hres
=
IEnumVARIANT_Reset
(
enum_var
);
ok
(
hres
==
S_OK
,
"Reset failed: %08x
\n
"
,
hres
);
hres
=
IEnumVARIANT_Skip
(
enum_var
,
len
+
1
);
ok
(
hres
==
S_FALSE
,
"Skip failed: %08x
\n
"
,
hres
);
IEnumVARIANT_Release
(
enum_var
);
}
static
void
test_elems
(
IHTMLDocument2
*
doc
)
{
...
...
@@ -6702,6 +6750,7 @@ static void test_elems(IHTMLDocument2 *doc)
child_col
=
get_child_nodes
((
IUnknown
*
)
elem
);
ok
(
child_col
!=
NULL
,
"child_coll == NULL
\n
"
);
if
(
child_col
)
{
IUnknown
*
enum_unk
;
LONG
length
=
0
;
test_disp
((
IUnknown
*
)
child_col
,
&
DIID_DispDOMChildrenCollection
,
"[object]"
);
...
...
@@ -6753,6 +6802,13 @@ static void test_elems(IHTMLDocument2 *doc)
test_child_col_disp
(
child_col
);
hres
=
IHTMLDOMChildrenCollection_get__newEnum
(
child_col
,
&
enum_unk
);
ok
(
hres
==
S_OK
,
"get__newEnum failed: %08x
\n
"
,
hres
);
test_enum_children
(
enum_unk
,
length
);
IUnknown_Release
(
enum_unk
);
IHTMLDOMChildrenCollection_Release
(
child_col
);
}
...
...
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