[PATCH] IXMLDOMAttribute does not support get_nextSibling
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Sun Jan 6 03:38:51 CST 2008
---
dlls/msxml3/attribute.c | 10 ++++++++--
dlls/msxml3/tests/domdoc.c | 9 +++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c
index 6898299..a1362d9 100644
--- a/dlls/msxml3/attribute.c
+++ b/dlls/msxml3/attribute.c
@@ -214,8 +214,14 @@ static HRESULT WINAPI domattr_get_nextSibling(
IXMLDOMAttribute *iface,
IXMLDOMNode** domNode)
{
- domattr *This = impl_from_IXMLDOMAttribute( iface );
- return IXMLDOMNode_get_nextSibling( This->node, domNode );
+ if(!domNode)
+ return E_INVALIDARG;
+
+ /* Attribute nodes does not have a next Sibling */
+ if(domNode)
+ *domNode = NULL;
+
+ return S_FALSE;
}
static HRESULT WINAPI domattr_get_attributes(
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index c4f8882..66b942c 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -1824,7 +1824,16 @@ static void test_xmlTypes(void)
ok(hr == S_OK, "ret %08x\n", hr );
if(hr == S_OK)
{
+ IXMLDOMNode *pNextChild = 0x1;
IXMLDOMNode *pNewChild = (IXMLDOMNode *)0x1;
+
+ hr = IXMLDOMAttribute_get_nextSibling(pAttrubute, NULL);
+ ok(hr == E_INVALIDARG, "ret %08x\n", hr );
+
+ hr = IXMLDOMAttribute_get_nextSibling(pAttrubute, &pNextChild);
+ ok(hr == S_FALSE, "ret %08x\n", hr );
+ ok(pNextChild == NULL, "pNextChild not NULL");
+
hr = IXMLDOMElement_appendChild(pElement, (IXMLDOMNode*)pAttrubute, &pNewChild);
ok(hr == E_FAIL, "ret %08x\n", hr );
ok(pNewChild == NULL, "pNewChild not NULL");
--
1.5.3.7
--------------070908070001000709080607--
More information about the wine-patches
mailing list