Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/msxml3/tests/domdoc.c | 43 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 63fc57527b4..2880edc8e0d 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -46,6 +46,8 @@ #include "wine/heap.h" #include "wine/test.h"
+#define XML_E_UNEXPECTED_ATTRIBUTE 0xC00CE56C + /* undef the #define in msxml2 so that we can access all versions */ #undef CLSID_DOMDocument
@@ -8529,10 +8531,11 @@ static void test_createProcessingInstruction(void) static const char xml3_wine[] = "<?xml version=\"1.0\" standalone=\"yes\"?>\n<test/>\n"; IXMLDOMProcessingInstruction *pi; IXMLDOMDocument *doc; - IXMLDOMNode *node; + IXMLDOMNode *node, *item; + IXMLDOMNamedNodeMap *node_map; IXMLDOMElement *element; WCHAR buff[10]; - BSTR xml; + BSTR xml, bstr; VARIANT var; HRESULT hr; IStream *stream; @@ -8543,6 +8546,10 @@ static void test_createProcessingInstruction(void)
doc = create_document(&IID_IXMLDOMDocument);
+ hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version="1.0" encoding="windows-1252" dummy="value""), &pi); +todo_wine + ok(hr == XML_E_UNEXPECTED_ATTRIBUTE, "got 0x%08x\n", hr); + /* test for BSTR handling, pass broken BSTR */ memcpy(&buff[2], L"test", 5 * sizeof(WCHAR)); /* just a big length */ @@ -8561,6 +8568,38 @@ static void test_createProcessingInstruction(void) ok(hr == S_OK, "got 0x%08x\n", hr); hr = IXMLDOMDocument_appendChild(doc, node, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMNode_get_attributes(node, &node_map); + ok(hr == S_OK, "got 0x%08x\n", hr); + + item = (void *)0xdeadbeef; + hr = IXMLDOMNamedNodeMap_getNamedItem(node_map, _bstr_("xml"), &item); + ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(!item, "got %p\n", item); + + item = NULL; + hr = IXMLDOMNamedNodeMap_getNamedItem(node_map, _bstr_("encoding"), &item); +todo_wine + ok(hr == S_OK, "got 0x%08x\n", hr); +todo_wine + ok(item != NULL, "got NULL\n"); + +if (hr == S_OK) +{ + hr = IXMLDOMNode_get_nodeName(item, &bstr); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(bstr, L"encoding"), "got %s\n", wine_dbgstr_w(bstr)); + SysFreeString(bstr); + + VariantInit(&var); + hr = IXMLDOMNode_get_nodeValue(item, &var); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&var) == VT_BSTR, "got %u\n", V_VT(&var)); + ok(!lstrcmpW(V_BSTR(&var), L"windows-1252"), "got %s\n", wine_dbgstr_w(V_BSTR(&var))); + VariantClear(&var); +} + + IXMLDOMNamedNodeMap_Release(node_map); IXMLDOMNode_Release(node); IXMLDOMProcessingInstruction_Release(pi);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=89396
Your paranoid android.
=== w2008s64 (32 bit report) ===
msxml3: domdoc.c:8671: Test failed: got "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\nest/>\r\n"
=== w7u_2qxl (32 bit report) ===
msxml3: domdoc.c:8628: Test failed: got "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\npen>\r\n" domdoc.c:8650: Test failed: got "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\npen>\r\n" domdoc.c:8671: Test failed: got "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\nest/>\r\npen>\r\n"
=== w7u_adm (32 bit report) ===
msxml3: domdoc.c:8671: Test failed: got "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\nest/>\r\n"
=== w7u_el (32 bit report) ===
msxml3: domdoc.c:8671: Test failed: got "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\nest/>\r\n"
=== wvistau64 (64 bit report) ===
msxml3: domdoc.c:8628: Test failed: got "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\npen>\r\n" domdoc.c:8650: Test failed: got "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\npen>\r\n" domdoc.c:8671: Test failed: got "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\nest/>\r\npen>\r\n"
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w2008s64 (64 bit report) ===
msxml3: domdoc.c:8628: Test failed: got "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\npen>\r\nd" domdoc.c:8650: Test failed: got "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\npen>\r\nd" domdoc.c:8671: Test failed: got "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\nest/>\r\npen>\r\nd"
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w864 (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w1064v1507 (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w1064v1809 (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w1064 (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w1064_2qxl (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w10pro64 (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w10pro64_ar (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w10pro64_he (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w10pro64_ja (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w10pro64_zh_CN (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)