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 ba8453430c6..59a8a243c87 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=89406
Your paranoid android.
=== wvistau64 (64 bit report) ===
Report validation errors: msxml3:domdoc crashed (c0000374)
=== w2008s64 (64 bit report) ===
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)
Hi,
On Tue, 27 Apr 2021, Marvin wrote:
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=89406
Your paranoid android.
[...]
=== w864 (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)
Predictably this causes the test to crash on most Windows versions:
https://test.winehq.org/data/patterns.html#msxml3:domdoc
Could you please have a look?
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
On 4/27/21 12:29 PM, Dmitry Timoshkov wrote:
+#define XML_E_UNEXPECTED_ATTRIBUTE 0xC00CE56C
Testing with FAILED() is probably enough.