From: Daniel Lehman dlehman25@gmail.com
--- dlls/msxml3/tests/domdoc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index d7de144c84c..f8d80abeba2 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -13653,14 +13653,13 @@ todo_wine { typedef struct _namespace_as_attribute_t { const GUID *guid; const char *clsid; - const char *xmlns_uri; } namespace_as_attribute_t;
static const namespace_as_attribute_t namespace_as_attribute_test_data[] = { - { &CLSID_DOMDocument, "CLSID_DOMDocument", "" }, - { &CLSID_DOMDocument2, "CLSID_DOMDocument2", "" }, - { &CLSID_DOMDocument26, "CLSID_DOMDocument26", "" }, - { &CLSID_DOMDocument30, "CLSID_DOMDocument30", "" }, + { &CLSID_DOMDocument, "CLSID_DOMDocument" }, + { &CLSID_DOMDocument2, "CLSID_DOMDocument2" }, + { &CLSID_DOMDocument26, "CLSID_DOMDocument26" }, + { &CLSID_DOMDocument30, "CLSID_DOMDocument30" }, { 0 } };
@@ -13788,7 +13787,7 @@ static void test_namespaces_as_attributes(void) { ok(hr == S_OK, "Failed to get namespace URI, hr %#lx.\n", hr); if (test->prefixes[i] && !strcmp(test->prefixes[i], "xmlns")) - ok(!lstrcmpW(str, _bstr_(entry->xmlns_uri)), "got %s\n", wine_dbgstr_w(str)); + ok(!SysStringLen(str), "got %s\n", wine_dbgstr_w(str)); else ok(!lstrcmpW(str, _bstr_(test->uris[i])), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
From: Daniel Lehman dlehman25@gmail.com
--- dlls/msxml3/tests/domdoc.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index f8d80abeba2..5ceec0bf716 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -13675,6 +13675,7 @@ static void test_namespaces_as_attributes(void) const char *basenames[3]; const char *uris[3]; const char *texts[3]; + const char *xmls[3]; }; static const struct test tests[] = { { @@ -13684,6 +13685,7 @@ static void test_namespaces_as_attributes(void) { "b", "d", "ns" }, /* baseName */ { "nshref", NULL, "" }, /* namespaceURI */ { "b attr", "d attr", "nshref" }, /* text */ + { "ns:b="b attr"", "d="d attr"", "xmlns:ns="nshref"" }, /* xml */ }, /* property only */ { @@ -13693,6 +13695,7 @@ static void test_namespaces_as_attributes(void) { "d" }, /* baseName */ { NULL }, /* namespaceURI */ { "d attr" }, /* text */ + { "d="d attr"" }, /* xml */ }, /* namespace only */ { @@ -13702,6 +13705,7 @@ static void test_namespaces_as_attributes(void) { "ns" }, /* baseName */ { "" }, /* namespaceURI */ { "nshref" }, /* text */ + { "xmlns:ns="nshref"" }, /* xml */ }, /* no properties or namespaces */ { @@ -13801,6 +13805,12 @@ static void test_namespaces_as_attributes(void) ok(!lstrcmpW(str, _bstr_(test->texts[i])), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
+ str = NULL; + hr = IXMLDOMNode_get_xml(item, &str); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!lstrcmpW(str, _bstr_(test->xmls[i])), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + IXMLDOMNode_Release(item); }
From: Daniel Lehman dlehman25@gmail.com
--- dlls/msxml3/tests/domdoc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 5ceec0bf716..ebc6476069a 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -13734,37 +13734,37 @@ static void test_namespaces_as_attributes(void) test = tests; while (test->xml) { hr = CoCreateInstance(entry->guid, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (void **)&doc); - ok(SUCCEEDED(hr), "Failed to create document %s, hr %#lx.\n", wine_dbgstr_guid(entry->guid), hr); + ok(hr == S_OK, "Unexpected hr %#lx for %s.\n", hr, wine_dbgstr_guid(entry->guid));
hr = IXMLDOMDocument_loadXML(doc, _bstr_(test->xml), &b); - ok(hr == S_OK, "Failed to load xml, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
node = NULL; hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("a"), &node); - ok(SUCCEEDED(hr), "Failed to select a node, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXMLDOMNode_get_attributes(node, &map); - ok(SUCCEEDED(hr), "Failed to get attributes, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
len = -1; hr = IXMLDOMNamedNodeMap_get_length(map, &len); - ok(SUCCEEDED(hr), "Failed to get map length, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(len == test->explen, "got %ld\n", len);
item = NULL; hr = IXMLDOMNamedNodeMap_get_item(map, test->explen+1, &item); - ok(hr == S_FALSE, "Failed to get item, hr %#lx.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); ok(!item, "Item should be NULL\n");
for (i = 0; i < len; i++) { item = NULL; hr = IXMLDOMNamedNodeMap_get_item(map, i, &item); - ok(SUCCEEDED(hr), "Failed to get item, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL; hr = IXMLDOMNode_get_nodeName(item, &str); - ok(SUCCEEDED(hr), "Failed to get node name, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!lstrcmpW(str, _bstr_(test->names[i])), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -13772,7 +13772,7 @@ static void test_namespaces_as_attributes(void) hr = IXMLDOMNode_get_prefix(item, &str); if (test->prefixes[i]) { - ok(hr == S_OK, "Failed to get prefix, 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)); SysFreeString(str); } @@ -13781,7 +13781,7 @@ static void test_namespaces_as_attributes(void)
str = NULL; hr = IXMLDOMNode_get_baseName(item, &str); - ok(SUCCEEDED(hr), "Failed to get base name, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!lstrcmpW(str, _bstr_(test->basenames[i])), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -13789,7 +13789,7 @@ static void test_namespaces_as_attributes(void) hr = IXMLDOMNode_get_namespaceURI(item, &str); if (test->uris[i]) { - ok(hr == S_OK, "Failed to get namespace URI, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (test->prefixes[i] && !strcmp(test->prefixes[i], "xmlns")) ok(!SysStringLen(str), "got %s\n", wine_dbgstr_w(str)); else @@ -13801,7 +13801,7 @@ static void test_namespaces_as_attributes(void)
str = NULL; hr = IXMLDOMNode_get_text(item, &str); - ok(SUCCEEDED(hr), "Failed to get node text, hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!lstrcmpW(str, _bstr_(test->texts[i])), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
This merge request was approved by Nikolay Sivov.