Commit 3b3a65ad authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msxml3: Handle default namespace in get_baseName.

parent bed12d84
......@@ -1609,7 +1609,11 @@ HRESULT node_get_base_name(xmlnode *This, BSTR *name)
{
if (!name) return E_INVALIDARG;
*name = bstr_from_xmlChar(This->node->name);
if (xmldoc_version(This->node->doc) != MSXML6 &&
xmlStrEqual(This->node->name, BAD_CAST "xmlns"))
*name = SysAllocString(L"");
else
*name = bstr_from_xmlChar(This->node->name);
if (!*name) return E_OUTOFMEMORY;
TRACE("returning %s\n", debugstr_w(*name));
......
......@@ -13778,6 +13778,7 @@ static void test_namespaces_as_attributes(void)
str = NULL;
hr = IXMLDOMNode_get_nodeName(item, &str);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine_if(test->todo)
ok(!lstrcmpW(str, _bstr_(test->names[i])), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
......@@ -13797,7 +13798,6 @@ static void test_namespaces_as_attributes(void)
str = NULL;
hr = IXMLDOMNode_get_baseName(item, &str);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine_if(test->todo)
ok(!lstrcmpW(str, _bstr_(test->basenames[i])), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
......
......@@ -261,6 +261,7 @@ static void test_namespaces_as_attributes(void)
str = NULL;
hr = IXMLDOMNode_get_nodeName(item, &str);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine_if(test->todo)
ok(!lstrcmpW(str, test->names[i]), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
......@@ -283,7 +284,6 @@ static void test_namespaces_as_attributes(void)
hr = IXMLDOMNode_get_baseName(item, &str);
/* MSXML4 can report different results with different service packs */
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine_if(test->todo)
ok(!lstrcmpW(str, test->basenames[i]) || broken(!lstrcmpW(str, L"xmlns")),
"got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
......
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