mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
msxml3: Fix IXMLDOMNamedNodeMap_getNamedItem() conformance on error.
This commit is contained in:
parent
4195697cc1
commit
47b6d3a1e3
@ -165,7 +165,10 @@ static HRESULT WINAPI xmlnodemap_getNamedItem(
|
||||
xmlAttrPtr attr;
|
||||
xmlNodePtr node;
|
||||
|
||||
TRACE("%p %s\n", This, debugstr_w(name) );
|
||||
TRACE("%p %s %p\n", This, debugstr_w(name), namedItem );
|
||||
|
||||
if ( !namedItem )
|
||||
return E_INVALIDARG;
|
||||
|
||||
node = xmlNodePtr_from_domnode( This->node, 0 );
|
||||
if ( !node )
|
||||
@ -176,7 +179,10 @@ static HRESULT WINAPI xmlnodemap_getNamedItem(
|
||||
HeapFree( GetProcessHeap(), 0, element_name );
|
||||
|
||||
if ( !attr )
|
||||
return E_FAIL;
|
||||
{
|
||||
*namedItem = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
*namedItem = create_node( (xmlNodePtr) attr );
|
||||
|
||||
|
@ -396,6 +396,19 @@ todo_wine
|
||||
IXMLDOMNode_Release(node);
|
||||
SysFreeString( str );
|
||||
|
||||
str = SysAllocString( szdl );
|
||||
r = IXMLDOMNamedNodeMap_getNamedItem( map, str, NULL );
|
||||
ok( r == E_INVALIDARG, "getNamedItem should return E_INVALIDARG\n");
|
||||
SysFreeString( str );
|
||||
|
||||
/* something that isn't in szComplete4 */
|
||||
str = SysAllocString( szOpen );
|
||||
node = (IXMLDOMNode *) 1;
|
||||
r = IXMLDOMNamedNodeMap_getNamedItem( map, str, &node );
|
||||
ok( r = S_FALSE, "getNamedItem found a node that wasn't there\n");
|
||||
ok( node == NULL, "getNamedItem should have returned NULL\n");
|
||||
SysFreeString( str );
|
||||
|
||||
/* test indexed access of attributes */
|
||||
r = IXMLDOMNamedNodeMap_get_length( map, &count );
|
||||
ok ( r == S_OK, "get_length wrong code\n");
|
||||
|
Loading…
Reference in New Issue
Block a user