From: Daniel Lehman dlehman25@gmail.com
Based on patch from Damjan Jovanovic damjan.jov@gmail.com --- dlls/msxml3/tests/domdoc.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index cf9fb62a65e..8368afa09a1 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -50,6 +50,15 @@ /* undef the #define in msxml2 so that we can access all versions */ #undef CLSID_DOMDocument
+typedef enum { + MSXML1 = 0x01, + MSXML2 = 0x02, + MSXML26 = 0x04, + MSXML3 = 0x08, + MSXML4 = 0x10, + MSXML6 = 0x20 +} MSXML_VERSION; + DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); DEFINE_GUID(IID_transformdest_unknown,0xf5078f3a,0xc551,0x11d3,0x89,0xb9,0x00,0x00,0xf8,0x1f,0xe2,0x21);
@@ -13648,16 +13657,17 @@ todo_wine { typedef struct _namespace_as_attribute_t { const GUID *guid; const char *clsid; + MSXML_VERSION ver; 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_DOMDocument40, "CLSID_DOMDocument40", "" }, - { &CLSID_DOMDocument60, "CLSID_DOMDocument60", "http://www.w3.org/2000/xmlns/" }, + { &CLSID_DOMDocument, "CLSID_DOMDocument", MSXML1, "" }, + { &CLSID_DOMDocument2, "CLSID_DOMDocument2", MSXML2, "" }, + { &CLSID_DOMDocument26, "CLSID_DOMDocument26", MSXML26, "" }, + { &CLSID_DOMDocument30, "CLSID_DOMDocument30", MSXML3, "" }, + { &CLSID_DOMDocument40, "CLSID_DOMDocument40", MSXML4, "" }, + { &CLSID_DOMDocument60, "CLSID_DOMDocument60", MSXML6, "http://www.w3.org/2000/xmlns/" }, { 0 } };
@@ -13672,6 +13682,7 @@ static void test_namespaces_as_attributes(void) const char *basenames[3]; const char *uris[3]; const char *texts[3]; + MSXML_VERSION versions; }; static const struct test tests[] = { { @@ -13725,7 +13736,13 @@ static void test_namespaces_as_attributes(void) }
test = tests; - while (test->xml) { + while (test->xml) + { + if (test->versions && !(entry->ver & test->versions)) + { + test++; + continue; + } 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);
@@ -13733,7 +13750,7 @@ static void test_namespaces_as_attributes(void) ok(hr == S_OK, "Failed to load xml, hr %#lx.\n", hr);
node = NULL; - hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("a"), &node); + hr = IXMLDOMDocument_get_firstChild(doc, &node); ok(SUCCEEDED(hr), "Failed to select a node, hr %#lx.\n", hr);
hr = IXMLDOMNode_get_attributes(node, &map);