Nikolay Sivov : msxml3: Fix get_namespaceURI() for document nodes.

Alexandre Julliard julliard at winehq.org
Mon Nov 28 14:00:06 CST 2011


Module: wine
Branch: master
Commit: 2508025bcd658688177471210af9ae8d4eac1a4b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2508025bcd658688177471210af9ae8d4eac1a4b

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Nov 27 22:36:32 2011 +0300

msxml3: Fix get_namespaceURI() for document nodes.

---

 dlls/msxml3/domdoc.c       |    4 +---
 dlls/msxml3/tests/domdoc.c |   11 ++++++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 4640e62..68f47a7 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -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 )
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index 89eb1f6..b2a229b 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -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);




More information about the wine-cvs mailing list