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
ebf91350
Commit
ebf91350
authored
Jan 09, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Some put_dataType() tests for nodes without typed data.
parent
d51dd8e4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
34 deletions
+55
-34
cdata.c
dlls/msxml3/cdata.c
+2
-2
comment.c
dlls/msxml3/comment.c
+1
-1
docfrag.c
dlls/msxml3/docfrag.c
+1
-1
entityref.c
dlls/msxml3/entityref.c
+1
-1
pi.c
dlls/msxml3/pi.c
+1
-1
domdoc.c
dlls/msxml3/tests/domdoc.c
+49
-28
No files found.
dlls/msxml3/cdata.c
View file @
ebf91350
...
...
@@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
#ifdef HAVE_LIBXML2
typedef
struct
_domcdata
typedef
struct
{
xmlnode
node
;
IXMLDOMCDATASection
IXMLDOMCDATASection_iface
;
...
...
@@ -436,7 +436,7 @@ static HRESULT WINAPI domcdata_put_dataType(
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
if
(
!
p
)
return
E_INVALIDARG
;
...
...
dlls/msxml3/comment.c
View file @
ebf91350
...
...
@@ -435,7 +435,7 @@ static HRESULT WINAPI domcomment_put_dataType(
{
domcomment
*
This
=
impl_from_IXMLDOMComment
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
if
(
!
p
)
return
E_INVALIDARG
;
...
...
dlls/msxml3/docfrag.c
View file @
ebf91350
...
...
@@ -433,7 +433,7 @@ static HRESULT WINAPI domfrag_put_dataType(
{
domfrag
*
This
=
impl_from_IXMLDOMDocumentFragment
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
if
(
!
p
)
return
E_INVALIDARG
;
...
...
dlls/msxml3/entityref.c
View file @
ebf91350
...
...
@@ -428,7 +428,7 @@ static HRESULT WINAPI entityref_put_dataType(
{
entityref
*
This
=
impl_from_IXMLDOMEntityReference
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
if
(
!
p
)
return
E_INVALIDARG
;
...
...
dlls/msxml3/pi.c
View file @
ebf91350
...
...
@@ -506,7 +506,7 @@ static HRESULT WINAPI dom_pi_put_dataType(
{
dom_pi
*
This
=
impl_from_IXMLDOMProcessingInstruction
(
iface
);
FIXM
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
TRAC
E
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
if
(
!
p
)
return
E_INVALIDARG
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
ebf91350
...
...
@@ -6777,10 +6777,26 @@ static put_datatype_t put_datatype_data[] = {
{
NULL
}
};
static
void
test_nodeTypeTests
(
void
)
typedef
struct
{
DOMNodeType
type
;
HRESULT
hr
;
}
put_datatype_notype_t
;
static
put_datatype_notype_t
put_dt_notype
[]
=
{
{
NODE_PROCESSING_INSTRUCTION
,
E_FAIL
},
{
NODE_DOCUMENT_FRAGMENT
,
E_FAIL
},
{
NODE_ENTITY_REFERENCE
,
E_FAIL
},
{
NODE_CDATA_SECTION
,
E_FAIL
},
{
NODE_COMMENT
,
E_FAIL
},
{
NODE_INVALID
}
};
static
void
test_put_dataType
(
void
)
{
const
put_datatype_notype_t
*
ptr2
=
put_dt_notype
;
const
put_datatype_t
*
ptr
=
put_datatype_data
;
IXMLDOMElement
*
root
,
*
element
;
BSTR
nameW
,
type1W
,
type2W
;
IXMLDOMDocument
*
doc
;
HRESULT
hr
;
...
...
@@ -6831,6 +6847,38 @@ static void test_nodeTypeTests( void )
IXMLDOMElement_Release
(
element
);
/* try to set type for node without a type */
nameW
=
_bstr_
(
"testname"
);
type1W
=
_bstr_
(
"string"
);
type2W
=
_bstr_
(
"number"
);
while
(
ptr2
->
type
!=
NODE_INVALID
)
{
IXMLDOMNode
*
node
;
VARIANT
type
;
V_VT
(
&
type
)
=
VT_I2
;
V_I2
(
&
type
)
=
ptr2
->
type
;
hr
=
IXMLDOMDocument_createNode
(
doc
,
type
,
nameW
,
NULL
,
&
node
);
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
S_OK
)
{
hr
=
IXMLDOMElement_appendChild
(
root
,
node
,
NULL
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IXMLDOMNode_put_dataType
(
node
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
IXMLDOMNode_put_dataType
(
node
,
type1W
);
ok
(
hr
==
ptr2
->
hr
,
"failed for type %d, 0x%08x
\n
"
,
ptr2
->
type
,
ptr
->
hr
);
hr
=
IXMLDOMNode_put_dataType
(
node
,
type2W
);
ok
(
hr
==
ptr2
->
hr
,
"failed for type %d, 0x%08x
\n
"
,
ptr2
->
type
,
ptr
->
hr
);
IXMLDOMNode_Release
(
node
);
}
ptr2
++
;
}
IXMLDOMElement_Release
(
root
);
IXMLDOMDocument_Release
(
doc
);
free_bstrs
();
...
...
@@ -8490,32 +8538,6 @@ static void test_setAttributeNode(void)
free_bstrs
();
}
static
void
test_put_dataType
(
void
)
{
IXMLDOMCDATASection
*
cdata
;
IXMLDOMDocument
*
doc
;
VARIANT_BOOL
b
;
HRESULT
hr
;
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
if
(
!
doc
)
return
;
hr
=
IXMLDOMDocument_loadXML
(
doc
,
_bstr_
(
complete4A
),
&
b
);
ok
(
hr
==
S_OK
,
"loadXML failed
\n
"
);
ok
(
b
==
VARIANT_TRUE
,
"failed to load XML string
\n
"
);
hr
=
IXMLDOMDocument_createCDATASection
(
doc
,
_bstr_
(
"test"
),
&
cdata
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IXMLDOMCDATASection_put_dataType
(
cdata
,
_bstr_
(
"number"
));
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IXMLDOMCDATASection_put_dataType
(
cdata
,
_bstr_
(
"string"
));
ok
(
hr
==
E_FAIL
,
"got 0x%08x
\n
"
,
hr
);
IXMLDOMCDATASection_Release
(
cdata
);
IXMLDOMDocument_Release
(
doc
);
free_bstrs
();
}
static
void
test_createNode
(
void
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -11062,7 +11084,6 @@ START_TEST(domdoc)
test_XSLPattern
();
test_cloneNode
();
test_xmlTypes
();
test_nodeTypeTests
();
test_save
();
test_testTransforms
();
test_namespaces
();
...
...
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