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
2518b8f3
Commit
2518b8f3
authored
Apr 21, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElementCollection::get__newEnum tests.
parent
f7635f17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
1 deletion
+55
-1
dom.c
dlls/mshtml/tests/dom.c
+55
-1
No files found.
dlls/mshtml/tests/dom.c
View file @
2518b8f3
...
...
@@ -2108,9 +2108,12 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
const
elem_type_t
*
elem_types
,
LONG
exlen
)
{
IHTMLElementCollection
*
col
;
IEnumVARIANT
*
enum_var
;
IUnknown
*
enum_unk
;
ULONG
fetched
;
LONG
len
;
DWORD
i
;
VARIANT
name
,
index
;
VARIANT
name
,
index
,
v
,
vs
[
5
]
;
IDispatch
*
disp
,
*
disp2
;
HRESULT
hres
;
...
...
@@ -2128,6 +2131,13 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
V_VT
(
&
index
)
=
VT_EMPTY
;
hres
=
IHTMLElementCollection_get__newEnum
(
col
,
&
enum_unk
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"_newEnum failed: %08x
\n
"
,
hres
);
hres
=
IUnknown_QueryInterface
(
enum_unk
,
&
IID_IEnumVARIANT
,
(
void
**
)
&
enum_var
);
IUnknown_Release
(
enum_unk
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Could not get IEnumVARIANT iface: %08x
\n
"
,
hres
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
V_VT
(
&
name
)
=
VT_I4
;
V_I4
(
&
name
)
=
i
;
...
...
@@ -2151,9 +2161,53 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
IDispatch_Release
(
disp2
);
}
fetched
=
0
;
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IEnumVARIANT_Next
(
enum_var
,
1
,
&
v
,
&
fetched
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Next failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
fetched
==
1
,
"fetched = %d
\n
"
,
fetched
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_DISPATCH
&&
V_DISPATCH
(
&
v
),
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
ok_
(
__FILE__
,
line
)(
iface_cmp
((
IUnknown
*
)
disp
,
(
IUnknown
*
)
V_DISPATCH
(
&
v
)),
"disp != V_DISPATCH(v)
\n
"
);
IDispatch_Release
(
V_DISPATCH
(
&
v
));
IDispatch_Release
(
disp
);
}
fetched
=
0xdeadbeef
;
V_VT
(
&
v
)
=
VT_BOOL
;
hres
=
IEnumVARIANT_Next
(
enum_var
,
1
,
&
v
,
&
fetched
);
ok_
(
__FILE__
,
line
)(
hres
==
S_FALSE
,
"Next returned %08x, expected S_FALSE
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
fetched
==
0
,
"fetched = %d
\n
"
,
fetched
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_BOOL
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
hres
=
IEnumVARIANT_Reset
(
enum_var
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Reset failed: %08x
\n
"
,
hres
);
hres
=
IEnumVARIANT_Skip
(
enum_var
,
len
>
2
?
len
-
2
:
0
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Skip failed: %08x
\n
"
,
hres
);
memset
(
vs
,
0
,
sizeof
(
vs
));
fetched
=
0
;
hres
=
IEnumVARIANT_Next
(
enum_var
,
sizeof
(
vs
)
/
sizeof
(
*
vs
),
vs
,
&
fetched
);
ok_
(
__FILE__
,
line
)(
hres
==
S_FALSE
,
"Next failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
fetched
==
(
len
>
2
?
2
:
len
),
"fetched = %d
\n
"
,
fetched
);
if
(
len
)
{
ok_
(
__FILE__
,
line
)(
V_VT
(
vs
)
==
VT_DISPATCH
&&
V_DISPATCH
(
vs
),
"V_VT(vs[0]) = %d
\n
"
,
V_VT
(
vs
));
IDispatch_Release
(
V_DISPATCH
(
vs
));
}
if
(
len
>
1
)
{
ok_
(
__FILE__
,
line
)(
V_VT
(
vs
+
1
)
==
VT_DISPATCH
&&
V_DISPATCH
(
vs
+
1
),
"V_VT(vs[1]) = %d
\n
"
,
V_VT
(
vs
+
1
));
IDispatch_Release
(
V_DISPATCH
(
vs
+
1
));
}
hres
=
IEnumVARIANT_Reset
(
enum_var
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Reset failed: %08x
\n
"
,
hres
);
hres
=
IEnumVARIANT_Skip
(
enum_var
,
len
+
1
);
ok_
(
__FILE__
,
line
)(
hres
==
S_FALSE
,
"Skip failed: %08x
\n
"
,
hres
);
IEnumVARIANT_Release
(
enum_var
);
V_VT
(
&
name
)
=
VT_I4
;
V_I4
(
&
name
)
=
len
;
disp
=
(
void
*
)
0xdeadbeef
;
...
...
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