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
37bba6e6
Commit
37bba6e6
authored
Aug 16, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Add some supported interfaces checks.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
655fd2b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
38 deletions
+99
-38
domdoc.c
dlls/msxml3/tests/domdoc.c
+33
-11
httpreq.c
dlls/msxml3/tests/httpreq.c
+19
-0
saxreader.c
dlls/msxml3/tests/saxreader.c
+26
-26
schema.c
dlls/msxml3/tests/schema.c
+21
-1
No files found.
dlls/msxml3/tests/domdoc.c
View file @
37bba6e6
...
...
@@ -54,6 +54,21 @@
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
DEFINE_GUID
(
IID_transformdest_unknown
,
0xf5078f3a
,
0xc551
,
0x11d3
,
0x89
,
0xb9
,
0x00
,
0x00
,
0xf8
,
0x1f
,
0xe2
,
0x21
);
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
int
g_unexpectedcall
,
g_expectedcall
;
struct
msxmlsupported_data_t
...
...
@@ -1480,6 +1495,14 @@ static void test_domdoc( void )
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
if
(
!
doc
)
return
;
check_interface
(
doc
,
&
IID_IXMLDOMDocument
,
TRUE
);
check_interface
(
doc
,
&
IID_IPersistStreamInit
,
TRUE
);
check_interface
(
doc
,
&
IID_IObjectWithSite
,
TRUE
);
check_interface
(
doc
,
&
IID_IObjectSafety
,
TRUE
);
check_interface
(
doc
,
&
IID_IConnectionPointContainer
,
TRUE
);
check_interface
(
doc
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
doc
,
&
IID_IDispatchEx
,
TRUE
);
if
(
0
)
{
/* crashes on native */
...
...
@@ -2110,7 +2133,6 @@ static void test_persiststream(void)
IPersistStream
*
stream
;
IXMLDOMDocument
*
doc
;
ULARGE_INTEGER
size
;
IPersist
*
persist
;
IStream
*
istream
;
HRESULT
hr
;
CLSID
clsid
;
...
...
@@ -2130,11 +2152,8 @@ static void test_persiststream(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
((
IUnknown
*
)
stream
==
(
IUnknown
*
)
streaminit
,
"got %p, %p
\n
"
,
stream
,
streaminit
);
hr
=
IPersistStream_QueryInterface
(
stream
,
&
IID_IPersist
,
(
void
**
)
&
persist
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IXMLDOMDocument_QueryInterface
(
doc
,
&
IID_IPersist
,
(
void
**
)
&
persist
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x
\n
"
,
hr
);
check_interface
(
stream
,
&
IID_IPersist
,
FALSE
);
check_interface
(
doc
,
&
IID_IPersist
,
FALSE
);
hr
=
IPersistStreamInit_GetClassID
(
streaminit
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -9039,6 +9058,10 @@ static void test_xsltemplate(void)
if
(
!
is_clsid_supported
(
&
CLSID_XSLTemplate
,
&
IID_IXSLTemplate
))
return
;
template
=
create_xsltemplate
(
&
IID_IXSLTemplate
);
check_interface
(
template
,
&
IID_IXSLTemplate
,
TRUE
);
check_interface
(
template
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
template
,
&
IID_IDispatchEx
,
TRUE
);
/* works as reset */
hr
=
IXSLTemplate_putref_stylesheet
(
template
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -10790,7 +10813,6 @@ static void test_mxnamespacemanager(void)
IMXNamespaceManager
*
nsmgr
;
IUnknown
*
unk1
,
*
unk2
;
WCHAR
buffW
[
250
];
IDispatch
*
disp
;
IUnknown
*
unk
;
HRESULT
hr
;
INT
len
;
...
...
@@ -10799,10 +10821,10 @@ static void test_mxnamespacemanager(void)
&
IID_IMXNamespaceManager
,
(
void
**
)
&
nsmgr
);
EXPECT_HR
(
hr
,
S_OK
);
/* IMXNamespaceManager inherits from IUnknown */
hr
=
IMXNamespaceManager_QueryInterface
(
nsmgr
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
EXPECT_HR
(
hr
,
S_OK
);
IDispatch_Release
(
disp
);
check_interface
(
nsmgr
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
nsmgr
,
&
IID_IDispatchEx
,
TRUE
);
check_interface
(
nsmgr
,
&
IID_IMXNamespaceManager
,
TRUE
);
check_interface
(
nsmgr
,
&
IID_IVBMXNamespaceManager
,
TRUE
);
hr
=
IMXNamespaceManager_QueryInterface
(
nsmgr
,
&
IID_IVBMXNamespaceManager
,
(
void
**
)
&
mgr2
);
EXPECT_HR
(
hr
,
S_OK
);
...
...
dlls/msxml3/tests/httpreq.c
View file @
37bba6e6
...
...
@@ -50,6 +50,21 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line)
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"expected refcount %d, got %d
\n
"
,
ref
,
rc
);
}
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
const
char
xmltestA
[]
=
"http://test.winehq.org/tests/xmltest.xml"
;
static
const
CHAR
xmltestbodyA
[]
=
"<?xml version=
\"
1.0
\"
encoding=
\"
utf-8
\"
?>
\n
<a>TEST</a>
\n
"
;
...
...
@@ -1457,6 +1472,10 @@ static void test_XMLHTTP(void)
xhr
=
create_xhr
();
check_interface
(
xhr
,
&
IID_IXMLHttpRequest
,
TRUE
);
check_interface
(
xhr
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
xhr
,
&
IID_IDispatchEx
,
FALSE
);
VariantInit
(
&
dummy
);
V_VT
(
&
dummy
)
=
VT_ERROR
;
V_ERROR
(
&
dummy
)
=
DISP_E_MEMBERNOTFOUND
;
...
...
dlls/msxml3/tests/saxreader.c
View file @
37bba6e6
...
...
@@ -48,6 +48,21 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line)
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"expected refcount %d, got %d
\n
"
,
ref
,
rc
);
}
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
LONG
get_refcount
(
void
*
iface
)
{
IUnknown
*
unk
=
iface
;
...
...
@@ -4861,6 +4876,11 @@ static void test_saxreader_dispex(void)
&
IID_ISAXXMLReader
,
(
void
**
)
&
reader
);
EXPECT_HR
(
hr
,
S_OK
);
check_interface
(
reader
,
&
IID_ISAXXMLReader
,
TRUE
);
check_interface
(
reader
,
&
IID_IVBSAXXMLReader
,
TRUE
);
check_interface
(
reader
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
reader
,
&
IID_IDispatchEx
,
TRUE
);
hr
=
ISAXXMLReader_QueryInterface
(
reader
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
EXPECT_HR
(
hr
,
S_OK
);
test_obj_dispex
(
unk
);
...
...
@@ -5811,40 +5831,20 @@ static void test_mxattr_dispex(void)
static
void
test_mxattr_qi
(
void
)
{
IVBSAXAttributes
*
vbsaxattr
,
*
vbsaxattr2
;
ISAXAttributes
*
saxattr
;
IMXAttributes
*
mxattr
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_SAXAttributes
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMXAttributes
,
(
void
**
)
&
mxattr
);
&
IID_IMXAttributes
,
(
void
**
)
&
mxattr
);
EXPECT_HR
(
hr
,
S_OK
);
EXPECT_REF
(
mxattr
,
1
);
hr
=
IMXAttributes_QueryInterface
(
mxattr
,
&
IID_ISAXAttributes
,
(
void
**
)
&
saxattr
);
EXPECT_HR
(
hr
,
S_OK
);
EXPECT_REF
(
mxattr
,
2
);
EXPECT_REF
(
saxattr
,
2
);
hr
=
IMXAttributes_QueryInterface
(
mxattr
,
&
IID_IVBSAXAttributes
,
(
void
**
)
&
vbsaxattr
);
EXPECT_HR
(
hr
,
S_OK
);
EXPECT_REF
(
vbsaxattr
,
3
);
EXPECT_REF
(
mxattr
,
3
);
EXPECT_REF
(
saxattr
,
3
);
hr
=
ISAXAttributes_QueryInterface
(
saxattr
,
&
IID_IVBSAXAttributes
,
(
void
**
)
&
vbsaxattr2
);
EXPECT_HR
(
hr
,
S_OK
);
EXPECT_REF
(
vbsaxattr
,
4
);
EXPECT_REF
(
mxattr
,
4
);
EXPECT_REF
(
saxattr
,
4
);
check_interface
(
mxattr
,
&
IID_IMXAttributes
,
TRUE
);
check_interface
(
mxattr
,
&
IID_ISAXAttributes
,
TRUE
);
check_interface
(
mxattr
,
&
IID_IVBSAXAttributes
,
TRUE
);
check_interface
(
mxattr
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
mxattr
,
&
IID_IDispatchEx
,
TRUE
);
IMXAttributes_Release
(
mxattr
);
ISAXAttributes_Release
(
saxattr
);
IVBSAXAttributes_Release
(
vbsaxattr
);
IVBSAXAttributes_Release
(
vbsaxattr2
);
}
static
struct
msxmlsupported_data_t
saxattr_support_data
[]
=
...
...
dlls/msxml3/tests/schema.c
View file @
37bba6e6
...
...
@@ -37,6 +37,21 @@
#define EXPECT_HR(hr,hr_exp) \
ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
const
CHAR
xdr_schema1_uri
[]
=
"x-schema:test1.xdr"
;
static
const
CHAR
xdr_schema1_xml
[]
=
"<?xml version='1.0'?>"
...
...
@@ -1808,8 +1823,13 @@ static void test_ifaces(void)
hr
=
IXMLDOMSchemaCollection2_QueryInterface
(
cache
,
&
CLSID_XMLSchemaCache60
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Could not get CLSID_XMLSchemaCache60 iface: %08x
\n
"
,
hr
);
ok
(
unk
==
(
IUnknown
*
)
cache
,
"unk != cache
\n
"
);
IUnknown_Release
(
unk
);
check_interface
(
cache
,
&
IID_IXMLDOMSchemaCollection
,
TRUE
);
check_interface
(
cache
,
&
IID_IXMLDOMSchemaCollection2
,
TRUE
);
check_interface
(
cache
,
&
IID_IDispatch
,
TRUE
);
check_interface
(
cache
,
&
IID_IDispatchEx
,
TRUE
);
IXMLDOMSchemaCollection2_Release
(
cache
);
}
...
...
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