Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c4a9d1cf
Commit
c4a9d1cf
authored
Aug 29, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Added more IDispatchEx tests.
parent
cdc8e02f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
38 deletions
+52
-38
domdoc.c
dlls/msxml3/tests/domdoc.c
+52
-38
No files found.
dlls/msxml3/tests/domdoc.c
View file @
c4a9d1cf
...
...
@@ -323,6 +323,55 @@ static void get_str_for_type(DOMNodeType type, char *buf)
}
}
#define test_disp(u) _test_disp(__LINE__,u)
static
void
_test_disp
(
unsigned
line
,
IUnknown
*
unk
)
{
DISPID
dispid
=
DISPID_XMLDOM_NODELIST_RESET
;
IDispatchEx
*
dispex
;
DWORD
dwProps
=
0
;
BSTR
sName
;
UINT
ticnt
;
IUnknown
*
pUnk
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IDispatch: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
ticnt
=
0xdeadbeef
;
hres
=
IDispatchEx_GetTypeInfoCount
(
dispex
,
&
ticnt
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"GetTypeInfoCount failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
ticnt
==
1
,
"ticnt=%u
\n
"
,
ticnt
);
sName
=
SysAllocString
(
szstar
);
hres
=
IDispatchEx_DeleteMemberByName
(
dispex
,
sName
,
fdexNameCaseSensitive
);
ok
(
hres
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
hres
);
SysFreeString
(
sName
);
hres
=
IDispatchEx_DeleteMemberByDispID
(
dispex
,
dispid
);
ok
(
hres
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
hres
);
hres
=
IDispatchEx_GetMemberProperties
(
dispex
,
dispid
,
grfdexPropCanAll
,
&
dwProps
);
ok
(
hres
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
hres
);
ok
(
dwProps
==
0
,
"expected 0 got %d
\n
"
,
dwProps
);
hres
=
IDispatchEx_GetMemberName
(
dispex
,
dispid
,
&
sName
);
ok
(
hres
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
SysFreeString
(
sName
);
hres
=
IDispatchEx_GetNextDispID
(
dispex
,
fdexEnumDefault
,
DISPID_XMLDOM_NODELIST_RESET
,
&
dispid
);
ok
(
hres
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
hres
);
hres
=
IDispatchEx_GetNameSpaceParent
(
dispex
,
&
pUnk
);
ok
(
hres
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
&&
pUnk
)
IUnknown_Release
(
pUnk
);
IDispatchEx_Release
(
dispex
);
}
static
int
get_node_position
(
IXMLDOMNode
*
node
)
{
HRESULT
r
;
...
...
@@ -457,6 +506,8 @@ static void test_domdoc( void )
if
(
r
!=
S_OK
)
return
;
test_disp
((
IUnknown
*
)
doc
);
/* try some stupid things */
r
=
IXMLDOMDocument_loadXML
(
doc
,
NULL
,
NULL
);
ok
(
r
==
S_FALSE
,
"loadXML failed
\n
"
);
...
...
@@ -1660,7 +1711,6 @@ static void test_getElementsByTagName(void)
VARIANT_BOOL
b
;
IXMLDOMDocument
*
doc
;
IXMLDOMNodeList
*
node_list
;
IDispatchEx
*
dispex
;
LONG
len
;
r
=
CoCreateInstance
(
&
CLSID_DOMDocument
,
NULL
,
...
...
@@ -1681,43 +1731,7 @@ static void test_getElementsByTagName(void)
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
len
==
6
,
"len %d
\n
"
,
len
);
r
=
IXMLDOMNodeList_QueryInterface
(
node_list
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
ok
(
r
==
S_OK
,
"rets %08x
\n
"
,
r
);
if
(
r
==
S_OK
)
{
DISPID
dispid
=
DISPID_XMLDOM_NODELIST_RESET
;
DWORD
dwProps
=
0
;
BSTR
sName
;
IUnknown
*
pUnk
;
sName
=
SysAllocString
(
szstar
);
r
=
IDispatchEx_DeleteMemberByName
(
dispex
,
sName
,
fdexNameCaseSensitive
);
ok
(
r
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
r
);
SysFreeString
(
sName
);
r
=
IDispatchEx_DeleteMemberByDispID
(
dispex
,
dispid
);
ok
(
r
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
r
);
r
=
IDispatchEx_GetMemberProperties
(
dispex
,
dispid
,
grfdexPropCanAll
,
&
dwProps
);
ok
(
r
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
r
);
ok
(
dwProps
==
0
,
"expected 0 got %d
\n
"
,
dwProps
);
r
=
IDispatchEx_GetMemberName
(
dispex
,
dispid
,
&
sName
);
ok
(
r
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
r
);
if
(
SUCCEEDED
(
r
)
)
SysFreeString
(
sName
);
r
=
IDispatchEx_GetNextDispID
(
dispex
,
fdexEnumDefault
,
DISPID_XMLDOM_NODELIST_RESET
,
&
dispid
);
ok
(
r
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
r
);
r
=
IDispatchEx_GetNameSpaceParent
(
dispex
,
&
pUnk
);
ok
(
r
==
E_NOTIMPL
,
"expected E_NOTIMPL got %08x
\n
"
,
r
);
if
(
r
==
S_OK
)
IUnknown_Release
(
pUnk
);
IDispatchEx_Release
(
dispex
);
}
test_disp
((
IUnknown
*
)
node_list
);
IXMLDOMNodeList_Release
(
node_list
);
SysFreeString
(
str
);
...
...
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