Commit 558ae52c authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msxml3: Stop tests crashing under windows 98.

parent 77416b86
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
#include "wine/test.h" #include "wine/test.h"
/* Deprecated Error Code */
#define XML_E_INVALIDATROOTLEVEL 0xc00ce556
static void append_str(char **str, const char *data) static void append_str(char **str, const char *data)
{ {
sprintf(*str, data); sprintf(*str, data);
...@@ -113,7 +116,10 @@ static void test_xmldoc(void) ...@@ -113,7 +116,10 @@ static void test_xmldoc(void)
ok(element == NULL, "Expected NULL element\n"); ok(element == NULL, "Expected NULL element\n");
hr = IPersistStreamInit_Load(psi, stream); hr = IPersistStreamInit_Load(psi, stream);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(hr == S_OK || hr == XML_E_INVALIDATROOTLEVEL, "Expected S_OK, got %08x\n", hr);
if(hr == XML_E_INVALIDATROOTLEVEL)
goto cleanup;
ok(stream != NULL, "Expected non-NULL stream\n"); ok(stream != NULL, "Expected non-NULL stream\n");
hr = IXMLDocument_get_root(doc, &element); hr = IXMLDocument_get_root(doc, &element);
...@@ -234,6 +240,7 @@ static void test_xmldoc(void) ...@@ -234,6 +240,7 @@ static void test_xmldoc(void)
IXMLElement_Release(child); IXMLElement_Release(child);
IXMLElementCollection_Release(collection); IXMLElementCollection_Release(collection);
IXMLElement_Release(element); IXMLElement_Release(element);
cleanup:
IStream_Release(stream); IStream_Release(stream);
IPersistStreamInit_Release(psi); IPersistStreamInit_Release(psi);
IXMLDocument_Release(doc); IXMLDocument_Release(doc);
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "wine/test.h" #include "wine/test.h"
#define ERROR_URL_NOT_FOUND 0x800c0006
static void test_xmlelem(void) static void test_xmlelem(void)
{ {
HRESULT hr; HRESULT hr;
...@@ -281,9 +283,13 @@ static void test_xmlelem_collection(void) ...@@ -281,9 +283,13 @@ static void test_xmlelem_collection(void)
url = SysAllocString(path); url = SysAllocString(path);
hr = IXMLDocument_put_URL(doc, url); hr = IXMLDocument_put_URL(doc, url);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr); /* Win98 returns ERROR_URL_NOT_FOUND */
ok(hr == S_OK || hr == ERROR_URL_NOT_FOUND, "Expected S_OK, got 0x%08x\n", hr);
SysFreeString(url); SysFreeString(url);
if(hr == ERROR_URL_NOT_FOUND)
goto cleanup;
hr = IXMLDocument_get_root(doc, &element); hr = IXMLDocument_get_root(doc, &element);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr); ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(element != NULL, "Expected non-NULL element\n"); ok(element != NULL, "Expected non-NULL element\n");
...@@ -434,6 +440,7 @@ static void test_xmlelem_collection(void) ...@@ -434,6 +440,7 @@ static void test_xmlelem_collection(void)
IEnumVARIANT_Release(enumVar); IEnumVARIANT_Release(enumVar);
IXMLElement_Release(element); IXMLElement_Release(element);
IXMLElementCollection_Release(collection); IXMLElementCollection_Release(collection);
cleanup:
IXMLDocument_Release(doc); IXMLDocument_Release(doc);
DeleteFileA("bank.xml"); DeleteFileA("bank.xml");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment