Commit 2508025b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Fix get_namespaceURI() for document nodes.

parent 852bde49
......@@ -1369,17 +1369,15 @@ static HRESULT WINAPI domdoc_get_parsed(
return S_OK;
}
static HRESULT WINAPI domdoc_get_namespaceURI(
IXMLDOMDocument3 *iface,
BSTR* namespaceURI )
{
domdoc *This = impl_from_IXMLDOMDocument3( iface );
TRACE("(%p)->(%p)\n", This, namespaceURI);
return node_get_namespaceURI(&This->node, namespaceURI);
return return_null_bstr( namespaceURI );
}
static HRESULT WINAPI domdoc_get_prefix(
IXMLDOMDocument3 *iface,
BSTR* prefix )
......
......@@ -7137,6 +7137,11 @@ static void test_namespaces(void)
EXPECT_HR(hr, S_OK);
ok(b == VARIANT_TRUE, "got %d\n", b);
str = (BSTR)0xdeadbeef;
hr = IXMLDOMDocument_get_namespaceURI(doc, &str);
EXPECT_HR(hr, S_FALSE);
ok(str == NULL, "got %p\n", str);
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("//XMI.content"), &node );
EXPECT_HR(hr, S_OK);
if(hr == S_OK)
......@@ -8757,11 +8762,11 @@ static void test_get_prefix(void)
/* 1. document */
str = (void*)0xdeadbeef;
hr = IXMLDOMDocument_get_prefix(doc, &str);
ok( hr == S_FALSE, "got 0x%08x\n", hr);
ok( str == 0, "got %p\n", str);
EXPECT_HR(hr, S_FALSE);
ok(str == NULL, "got %p\n", str);
hr = IXMLDOMDocument_get_prefix(doc, NULL);
ok( hr == E_INVALIDARG, "got 0x%08x\n", hr);
EXPECT_HR(hr, E_INVALIDARG);
/* 2. cdata */
hr = IXMLDOMDocument_createCDATASection(doc, NULL, &cdata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment