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
e906b136
Commit
e906b136
authored
Jan 08, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: get_attributes not supported for Attribute, CData, Comment, Doc, Doc…
msxml3: get_attributes not supported for Attribute, CData, Comment, Doc, Doc Frag, Entity and Text Nodes.
parent
2896c462
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
2 deletions
+58
-2
node.c
dlls/msxml3/node.c
+20
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+38
-0
No files found.
dlls/msxml3/node.c
View file @
e906b136
...
...
@@ -408,8 +408,26 @@ static HRESULT WINAPI xmlnode_get_attributes(
{
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
TRACE
(
"%p
\n
"
,
This
);
*
attributeMap
=
create_nodemap
(
iface
);
return
S_OK
;
if
(
!
attributeMap
)
return
E_INVALIDARG
;
switch
(
This
->
node
->
type
)
{
/* Attribute, CDataSection, Comment, Documents, Documents Fragments,
Entity and Text Nodes does not support get_attributes */
case
XML_ATTRIBUTE_NODE
:
case
XML_COMMENT_NODE
:
case
XML_DOCUMENT_NODE
:
case
XML_DOCUMENT_FRAG_NODE
:
case
XML_ENTITY_NODE
:
case
XML_TEXT_NODE
:
*
attributeMap
=
NULL
;
return
S_FALSE
;
default:
*
attributeMap
=
create_nodemap
(
iface
);
return
S_OK
;
}
}
static
HRESULT
WINAPI
xmlnode_insertBefore
(
...
...
dlls/msxml3/tests/domdoc.c
View file @
e906b136
...
...
@@ -512,6 +512,8 @@ static void test_domdoc( void )
ok
(
r
==
S_OK
,
"returns %08x
\n
"
,
r
);
if
(
nodetext
)
{
IXMLDOMNamedNodeMap
*
pAttribs
;
/* Text Last Child Checks */
r
=
IXMLDOMText_get_lastChild
(
nodetext
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"ret %08x
\n
"
,
r
);
...
...
@@ -520,6 +522,15 @@ static void test_domdoc( void )
r
=
IXMLDOMText_get_lastChild
(
nodetext
,
&
nodeChild
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
nodeChild
==
NULL
,
"nodeChild not NULL
\n
"
);
/* test get_attributes */
r
=
IXMLDOMText_get_attributes
(
nodetext
,
NULL
);
ok
(
r
==
E_INVALIDARG
,
"get_attributes returned wrong code
\n
"
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
r
=
IXMLDOMText_get_attributes
(
nodetext
,
&
pAttribs
);
ok
(
r
==
S_FALSE
,
"ret %08x
\n
"
,
r
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
}
IXMLDOMText_Release
(
nodetext
);
SysFreeString
(
str
);
...
...
@@ -1838,6 +1849,15 @@ static void test_xmlTypes(void)
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pNextChild
==
NULL
,
"pNextChild not NULL
\n
"
);
/* test get_attributes */
hr
=
IXMLDOMDocument_get_attributes
(
doc
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"get_attributes returned wrong code
\n
"
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
hr
=
IXMLDOMDocument_get_attributes
(
doc
,
&
pAttribs
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
hr
=
IXMLDOMDocument_createElement
(
doc
,
_bstr_
(
"Testing"
),
&
pRoot
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
...
...
@@ -1851,6 +1871,15 @@ static void test_xmlTypes(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
/* test get_attributes */
hr
=
IXMLDOMComment_get_attributes
(
pComment
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"get_attributes returned wrong code
\n
"
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
hr
=
IXMLDOMComment_get_attributes
(
pComment
,
&
pAttribs
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
hr
=
IXMLDOMElement_appendChild
(
pRoot
,
(
IXMLDOMNode
*
)
pComment
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
...
...
@@ -1909,6 +1938,15 @@ static void test_xmlTypes(void)
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pNextChild
==
NULL
,
"pNextChild not NULL
\n
"
);
/* test get_attributes */
hr
=
IXMLDOMAttribute_get_attributes
(
pAttrubute
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"get_attributes returned wrong code
\n
"
);
pAttribs
=
(
IXMLDOMNamedNodeMap
*
)
0x1
;
hr
=
IXMLDOMAttribute_get_attributes
(
pAttrubute
,
&
pAttribs
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
ok
(
pAttribs
==
NULL
,
"pAttribs not NULL
\n
"
);
hr
=
IXMLDOMElement_appendChild
(
pElement
,
(
IXMLDOMNode
*
)
pAttrubute
,
&
pNewChild
);
ok
(
hr
==
E_FAIL
,
"ret %08x
\n
"
,
hr
);
ok
(
pNewChild
==
NULL
,
"pNewChild not NULL
\n
"
);
...
...
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