mirror of
https://github.com/reactos/wine.git
synced 2024-11-30 07:00:30 +00:00
msxml3: IXMLDOMAttribute shouldn't report its parent.
This commit is contained in:
parent
535afbd3aa
commit
f65fd26fe1
@ -213,7 +213,10 @@ static HRESULT WINAPI domattr_get_parentNode(
|
|||||||
IXMLDOMNode** parent )
|
IXMLDOMNode** parent )
|
||||||
{
|
{
|
||||||
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
||||||
return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(&This->node), parent );
|
TRACE("(%p)->(%p)\n", This, parent);
|
||||||
|
if (!parent) return E_INVALIDARG;
|
||||||
|
*parent = NULL;
|
||||||
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI domattr_get_childNodes(
|
static HRESULT WINAPI domattr_get_childNodes(
|
||||||
|
@ -1216,8 +1216,19 @@ static void test_domnode( void )
|
|||||||
r = IXMLDOMElement_getAttributeNode( element, str, &attr);
|
r = IXMLDOMElement_getAttributeNode( element, str, &attr);
|
||||||
ok( r == S_OK, "GetAttributeNode ret %08x\n", r );
|
ok( r == S_OK, "GetAttributeNode ret %08x\n", r );
|
||||||
ok( attr != NULL, "getAttributeNode returned NULL\n" );
|
ok( attr != NULL, "getAttributeNode returned NULL\n" );
|
||||||
if(attr)
|
if (attr)
|
||||||
|
{
|
||||||
|
r = IXMLDOMAttribute_get_parentNode( attr, NULL );
|
||||||
|
ok( r == E_INVALIDARG, "Expected E_INVALIDARG, ret %08x\n", r );
|
||||||
|
|
||||||
|
/* attribute doesn't have a parent in msxml interpretation */
|
||||||
|
node = (IXMLDOMNode*)0xdeadbeef;
|
||||||
|
r = IXMLDOMAttribute_get_parentNode( attr, &node );
|
||||||
|
ok( r == S_FALSE, "Expected S_FALSE, ret %08x\n", r );
|
||||||
|
ok( node == NULL, "Expected NULL, got %p\n", node );
|
||||||
|
|
||||||
IXMLDOMAttribute_Release(attr);
|
IXMLDOMAttribute_Release(attr);
|
||||||
|
}
|
||||||
|
|
||||||
SysFreeString( str );
|
SysFreeString( str );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user