From c783e3db2f4843cd3bb0620aac57105687a6de78 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 8 Apr 2015 17:15:53 +0000 Subject: [PATCH] [MSXML3_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 svn path=/trunk/; revision=67093 --- rostests/winetests/msxml3/domdoc.c | 39 ++++++++++++++++++++++----- rostests/winetests/msxml3/saxreader.c | 9 +------ rostests/winetests/msxml3/schema.c | 1 + 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/rostests/winetests/msxml3/domdoc.c b/rostests/winetests/msxml3/domdoc.c index 74631d98311..312d5806539 100644 --- a/rostests/winetests/msxml3/domdoc.c +++ b/rostests/winetests/msxml3/domdoc.c @@ -416,11 +416,6 @@ static const WCHAR szComplete1[] = { '<','o','p','e','n','>','<','/','o','p','e','n','>','\n',0 }; static const WCHAR szComplete2[] = { - '<','?','x','m','l',' ', - 'v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n', - '<','o','>','<','/','o','>','\n',0 -}; -static const WCHAR szComplete3[] = { '<','?','x','m','l',' ', 'v','e','r','s','i','o','n','=','\'','1','.','0','\'','?','>','\n', '<','a','>','<','/','a','>','\n',0 @@ -1376,7 +1371,7 @@ if (0) /* try to load something else simple and valid */ b = VARIANT_FALSE; - str = SysAllocString( szComplete3 ); + str = SysAllocString( szComplete2 ); r = IXMLDOMDocument_loadXML( doc, str, &b ); ok( r == S_OK, "loadXML failed\n"); ok( b == VARIANT_TRUE, "failed to load XML string\n"); @@ -4946,7 +4941,6 @@ static void test_xmlTypes(void) doc = create_document(&IID_IXMLDOMDocument); - pNextChild = (void*)0xdeadbeef; hr = IXMLDOMDocument_get_nextSibling(doc, NULL); ok(hr == E_INVALIDARG, "ret %08x\n", hr ); @@ -8950,9 +8944,12 @@ static void test_appendChild(void) static void test_get_doctype(void) { + static const WCHAR emailW[] = {'e','m','a','i','l',0}; IXMLDOMDocumentType *doctype; IXMLDOMDocument *doc; + VARIANT_BOOL b; HRESULT hr; + BSTR s; doc = create_document(&IID_IXMLDOMDocument); @@ -8964,6 +8961,28 @@ static void test_get_doctype(void) ok(hr == S_FALSE, "got 0x%08x\n", hr); ok(doctype == NULL, "got %p\n", doctype); + hr = IXMLDOMDocument_loadXML(doc, _bstr_(szEmailXML), &b); + ok(b == VARIANT_TRUE, "failed to load XML string\n"); + + doctype = NULL; + hr = IXMLDOMDocument_get_doctype(doc, &doctype); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(doctype != NULL, "got %p\n", doctype); + + hr = IXMLDOMDocumentType_get_name(doctype, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IXMLDOMDocumentType_get_name(doctype, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(emailW, s), "got name %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + hr = IXMLDOMDocumentType_get_nodeName(doctype, &s); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(emailW, s), "got name %s\n", wine_dbgstr_w(s)); + SysFreeString(s); + + IXMLDOMDocumentType_Release(doctype); IXMLDOMDocument_Release(doc); } @@ -9165,6 +9184,11 @@ static void test_get_attributes(void) hr = IXMLDOMNode_get_attributes(node, &map); ok(hr == S_OK, "got %08x\n", hr); + node2 = (void*)0xdeadbeef; + hr = IXMLDOMNamedNodeMap_getNamedItem(map, _bstr_("attr"), &node2); + ok(hr == S_FALSE, "got %08x\n", hr); + ok(node2 == NULL, "got %p\n", node2); + length = -1; hr = IXMLDOMNamedNodeMap_get_length(map, &length); EXPECT_HR(hr, S_OK); @@ -11099,6 +11123,7 @@ static void test_xmlns_attribute(void) V_VT(&v) = VT_BSTR; V_BSTR(&v) = _bstr_("urn:schemas-microsoft-com:datatypes"); hr = IXMLDOMAttribute_put_nodeValue(pAttribute, v); + ok(hr == S_OK, "ret %08x\n", hr ); hr = IXMLDOMElement_setAttributeNode(root, pAttribute, NULL); ok(hr == S_OK, "ret %08x\n", hr ); diff --git a/rostests/winetests/msxml3/saxreader.c b/rostests/winetests/msxml3/saxreader.c index 388e92b93f5..43f041c9f18 100644 --- a/rostests/winetests/msxml3/saxreader.c +++ b/rostests/winetests/msxml3/saxreader.c @@ -314,13 +314,6 @@ static inline void flush_sequence(struct call_sequence **seg, int sequence_index call_seq->count = call_seq->size = 0; } -static inline void flush_sequences(struct call_sequence **seq, int n) -{ - int i; - for (i = 0; i < n; i++) - flush_sequence(seq, i); -} - static const char *get_event_name(CH event) { return event_names[event]; @@ -2899,7 +2892,7 @@ static void test_mxwriter_handlers(void) HRESULT hr; int i; - static const REFIID riids[] = + static REFIID riids[] = { &IID_ISAXContentHandler, &IID_ISAXLexicalHandler, diff --git a/rostests/winetests/msxml3/schema.c b/rostests/winetests/msxml3/schema.c index d9d99e66c18..113920e9a74 100644 --- a/rostests/winetests/msxml3/schema.c +++ b/rostests/winetests/msxml3/schema.c @@ -1300,6 +1300,7 @@ static void test_XDR_datatypes(void) VariantClear(&type); hr = IXMLDOMNode_get_nodeTypedValue(node, &type); + EXPECT_HR(hr, S_OK); ok(V_VT(&type) == VT_BSTR, "got variant type %i\n", V_VT(&v)); VariantClear(&type); IXMLDOMNode_Release(node); -- 2.17.1