Commit f0c08bd0 authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msxml3: Handle default namespace in get_prefix.

parent 814807a1
...@@ -589,14 +589,11 @@ static HRESULT WINAPI domattr_get_prefix( ...@@ -589,14 +589,11 @@ static HRESULT WINAPI domattr_get_prefix(
*prefix = NULL; *prefix = NULL;
if (ns) if (xmldoc_version(This->node.node->doc) != MSXML6 &&
{ xmlStrEqual(This->node.node->name, xmlns))
/* special case for default namespace definition */ *prefix = bstr_from_xmlChar(xmlns);
if (xmlStrEqual(This->node.node->name, xmlns)) else if (ns && ns->prefix)
*prefix = bstr_from_xmlChar(xmlns); *prefix = bstr_from_xmlChar(ns->prefix);
else if (ns->prefix)
*prefix = bstr_from_xmlChar(ns->prefix);
}
TRACE("prefix: %s\n", debugstr_w(*prefix)); TRACE("prefix: %s\n", debugstr_w(*prefix));
......
...@@ -13785,10 +13785,8 @@ static void test_namespaces_as_attributes(void) ...@@ -13785,10 +13785,8 @@ static void test_namespaces_as_attributes(void)
hr = IXMLDOMNode_get_prefix(item, &str); hr = IXMLDOMNode_get_prefix(item, &str);
if (test->prefixes[i]) if (test->prefixes[i])
{ {
todo_wine_if(test->todo) {
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(str, _bstr_(test->prefixes[i])), "got %s\n", wine_dbgstr_w(str)); ok(!lstrcmpW(str, _bstr_(test->prefixes[i])), "got %s\n", wine_dbgstr_w(str));
}
SysFreeString(str); SysFreeString(str);
} }
else else
......
...@@ -269,11 +269,9 @@ static void test_namespaces_as_attributes(void) ...@@ -269,11 +269,9 @@ static void test_namespaces_as_attributes(void)
if (test->prefixes[i]) if (test->prefixes[i])
{ {
/* MSXML4 can report different results with different service packs */ /* MSXML4 can report different results with different service packs */
todo_wine_if(test->todo) {
ok(hr == S_OK || broken(hr == S_FALSE), "Unexpected hr %#lx.\n", hr); ok(hr == S_OK || broken(hr == S_FALSE), "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(str, test->prefixes[i]) || broken(!str), ok(!lstrcmpW(str, test->prefixes[i]) || broken(!str),
"got %s\n", wine_dbgstr_w(str)); "got %s\n", wine_dbgstr_w(str));
}
SysFreeString(str); SysFreeString(str);
} }
else else
......
...@@ -105,10 +105,8 @@ static void test_create_attribute(void) ...@@ -105,10 +105,8 @@ static void test_create_attribute(void)
} }
else else
{ {
todo_wine_if(ptr->todo) {
ok(hr == S_FALSE, "%d: unexpected hr %#lx\n", i, hr); ok(hr == S_FALSE, "%d: unexpected hr %#lx\n", i, hr);
ok(str == NULL, "%d: got prefix %s\n", i, wine_dbgstr_w(str)); ok(str == NULL, "%d: got prefix %s\n", i, wine_dbgstr_w(str));
}
} }
SysFreeString(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