msxml3/tests: Don't raise a test error on first try to create a document.
This commit is contained in:
parent
5b6a24cc7c
commit
e5cd19a4cb
|
@ -3141,7 +3141,7 @@ static void test_XPath(void)
|
||||||
|
|
||||||
static void test_cloneNode(void )
|
static void test_cloneNode(void )
|
||||||
{
|
{
|
||||||
IXMLDOMDocument *doc = NULL;
|
IXMLDOMDocument *doc;
|
||||||
VARIANT_BOOL b;
|
VARIANT_BOOL b;
|
||||||
IXMLDOMNodeList *pList;
|
IXMLDOMNodeList *pList;
|
||||||
IXMLDOMNamedNodeMap *mapAttr;
|
IXMLDOMNamedNodeMap *mapAttr;
|
||||||
|
@ -3154,7 +3154,7 @@ static void test_cloneNode(void )
|
||||||
BSTR str;
|
BSTR str;
|
||||||
static const WCHAR szSearch[] = { 'l', 'c', '/', 'p', 'r', 0 };
|
static const WCHAR szSearch[] = { 'l', 'c', '/', 'p', 'r', 0 };
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
str = SysAllocString( szComplete4 );
|
str = SysAllocString( szComplete4 );
|
||||||
|
@ -3314,7 +3314,7 @@ static void test_xmlTypes(void)
|
||||||
VARIANT v;
|
VARIANT v;
|
||||||
LONG len = 0;
|
LONG len = 0;
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
pNextChild = (void*)0xdeadbeef;
|
pNextChild = (void*)0xdeadbeef;
|
||||||
|
@ -4385,7 +4385,7 @@ static void test_nodeTypeTests( void )
|
||||||
IXMLDOMElement *pElement;
|
IXMLDOMElement *pElement;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), NULL);
|
hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), NULL);
|
||||||
|
@ -4727,10 +4727,10 @@ static void test_DocumentSaveToDocument(void)
|
||||||
IXMLDOMElement *pRoot;
|
IXMLDOMElement *pRoot;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
doc2 = create_document(&IID_IXMLDOMDocument2);
|
doc2 = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc2)
|
if (!doc2)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
|
@ -4781,7 +4781,7 @@ static void test_DocumentSaveToFile(void)
|
||||||
DWORD read = 0;
|
DWORD read = 0;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), &pRoot);
|
hr = IXMLDOMDocument_createElement(doc, _bstr_("Testing"), &pRoot);
|
||||||
|
@ -4826,10 +4826,10 @@ static void test_testTransforms(void)
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
docSS = create_document(&IID_IXMLDOMDocument2);
|
docSS = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!docSS)
|
if (!docSS)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
|
@ -4864,7 +4864,7 @@ static void test_testTransforms(void)
|
||||||
|
|
||||||
static void test_Namespaces(void)
|
static void test_Namespaces(void)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument2 *doc;
|
IXMLDOMDocument *doc;
|
||||||
IXMLDOMNode *pNode;
|
IXMLDOMNode *pNode;
|
||||||
IXMLDOMNode *pNode2 = NULL;
|
IXMLDOMNode *pNode2 = NULL;
|
||||||
VARIANT_BOOL bSucc;
|
VARIANT_BOOL bSucc;
|
||||||
|
@ -4876,10 +4876,10 @@ static void test_Namespaces(void)
|
||||||
"<WEB:Site version=\"1.0\" />\n"
|
"<WEB:Site version=\"1.0\" />\n"
|
||||||
"</root>";
|
"</root>";
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szNamespacesXML), &bSucc);
|
hr = IXMLDOMDocument_loadXML(doc, _bstr_(szNamespacesXML), &bSucc);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
||||||
|
|
||||||
|
@ -4915,14 +4915,14 @@ static void test_Namespaces(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
IXMLDOMDocument2_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
|
|
||||||
free_bstrs();
|
free_bstrs();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_FormattingXML(void)
|
static void test_FormattingXML(void)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument2 *doc;
|
IXMLDOMDocument *doc;
|
||||||
IXMLDOMElement *pElement;
|
IXMLDOMElement *pElement;
|
||||||
VARIANT_BOOL bSucc;
|
VARIANT_BOOL bSucc;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -4930,16 +4930,16 @@ static void test_FormattingXML(void)
|
||||||
static const CHAR szLinefeedXML[] = "<?xml version=\"1.0\"?>\n<Root>\n\t<Sub val=\"A\" />\n</Root>";
|
static const CHAR szLinefeedXML[] = "<?xml version=\"1.0\"?>\n<Root>\n\t<Sub val=\"A\" />\n</Root>";
|
||||||
static const CHAR szLinefeedRootXML[] = "<Root>\r\n\t<Sub val=\"A\"/>\r\n</Root>";
|
static const CHAR szLinefeedRootXML[] = "<Root>\r\n\t<Sub val=\"A\"/>\r\n</Root>";
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szLinefeedXML), &bSucc);
|
hr = IXMLDOMDocument_loadXML(doc, _bstr_(szLinefeedXML), &bSucc);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
||||||
|
|
||||||
if(bSucc == VARIANT_TRUE)
|
if(bSucc == VARIANT_TRUE)
|
||||||
{
|
{
|
||||||
hr = IXMLDOMDocument2_get_documentElement(doc, &pElement);
|
hr = IXMLDOMDocument_get_documentElement(doc, &pElement);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -4952,43 +4952,43 @@ static void test_FormattingXML(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IXMLDOMDocument2_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
|
|
||||||
free_bstrs();
|
free_bstrs();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_NodeTypeValue(void)
|
static void test_NodeTypeValue(void)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument2 *doc;
|
IXMLDOMDocument *doc;
|
||||||
IXMLDOMNode *pNode;
|
IXMLDOMNode *pNode;
|
||||||
VARIANT_BOOL bSucc;
|
VARIANT_BOOL bSucc;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
VARIANT v;
|
VARIANT v;
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szTypeValueXML), &bSucc);
|
hr = IXMLDOMDocument_loadXML(doc, _bstr_(szTypeValueXML), &bSucc);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
||||||
if(bSucc == VARIANT_TRUE)
|
if(bSucc == VARIANT_TRUE)
|
||||||
{
|
{
|
||||||
hr = IXMLDOMDocument2_get_nodeValue(doc, NULL);
|
hr = IXMLDOMDocument_get_nodeValue(doc, NULL);
|
||||||
ok(hr == E_INVALIDARG, "ret %08x\n", hr );
|
ok(hr == E_INVALIDARG, "ret %08x\n", hr );
|
||||||
|
|
||||||
V_VT(&v) = VT_BSTR;
|
V_VT(&v) = VT_BSTR;
|
||||||
V_BSTR(&v) = NULL;
|
V_BSTR(&v) = NULL;
|
||||||
hr = IXMLDOMDocument2_get_nodeValue(doc, &v);
|
hr = IXMLDOMDocument_get_nodeValue(doc, &v);
|
||||||
ok(hr == S_FALSE, "ret %08x\n", hr );
|
ok(hr == S_FALSE, "ret %08x\n", hr );
|
||||||
ok(V_VT(&v) == VT_NULL, "expect VT_NULL got %d\n", V_VT(&v));
|
ok(V_VT(&v) == VT_NULL, "expect VT_NULL got %d\n", V_VT(&v));
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_get_nodeTypedValue(doc, NULL);
|
hr = IXMLDOMDocument_get_nodeTypedValue(doc, NULL);
|
||||||
ok(hr == E_INVALIDARG, "ret %08x\n", hr );
|
ok(hr == E_INVALIDARG, "ret %08x\n", hr );
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_get_nodeTypedValue(doc, &v);
|
hr = IXMLDOMDocument_get_nodeTypedValue(doc, &v);
|
||||||
ok(hr == S_FALSE, "ret %08x\n", hr );
|
ok(hr == S_FALSE, "ret %08x\n", hr );
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/string"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/string"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5010,7 +5010,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/string2"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/string2"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5023,7 +5023,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/number"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/number"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5036,7 +5036,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/number2"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/number2"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5049,7 +5049,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/int"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/int"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5062,7 +5062,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/fixed"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/fixed"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5074,7 +5074,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/bool"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/bool"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5087,7 +5087,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/datetime"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/datetime"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5100,7 +5100,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/datetimetz"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/datetimetz"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5113,7 +5113,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/date"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/date"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5126,7 +5126,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/time"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/time"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5139,7 +5139,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/timetz"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/timetz"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5152,7 +5152,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/i1"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/i1"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5165,7 +5165,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/i2"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/i2"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5178,7 +5178,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/i4"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/i4"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5191,7 +5191,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/ui1"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/ui1"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5204,7 +5204,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/ui2"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/ui2"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5217,7 +5217,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/ui4"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/ui4"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5243,7 +5243,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/r8"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/r8"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5256,7 +5256,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/float"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/float"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5269,7 +5269,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/uuid"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/uuid"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5282,7 +5282,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/binhex"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/binhex"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5299,7 +5299,7 @@ static void test_NodeTypeValue(void)
|
||||||
IXMLDOMNode_Release(pNode);
|
IXMLDOMNode_Release(pNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/binbase64"), &pNode);
|
hr = IXMLDOMDocument_selectSingleNode(doc, _bstr_("root/binbase64"), &pNode);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5317,15 +5317,15 @@ static void test_NodeTypeValue(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IXMLDOMDocument2_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
|
|
||||||
free_bstrs();
|
free_bstrs();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_TransformWithLoadingLocalFile(void)
|
static void test_TransformWithLoadingLocalFile(void)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument2 *doc = NULL;
|
IXMLDOMDocument *doc;
|
||||||
IXMLDOMDocument2 *xsl = NULL;
|
IXMLDOMDocument *xsl;
|
||||||
IXMLDOMNode *pNode;
|
IXMLDOMNode *pNode;
|
||||||
VARIANT_BOOL bSucc;
|
VARIANT_BOOL bSucc;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -5353,17 +5353,17 @@ static void test_TransformWithLoadingLocalFile(void)
|
||||||
lpPathBuffer[i] = '/';
|
lpPathBuffer[i] = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument2);
|
doc = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!doc) return;
|
if (!doc) return;
|
||||||
|
|
||||||
xsl = create_document(&IID_IXMLDOMDocument2);
|
xsl = create_document(&IID_IXMLDOMDocument);
|
||||||
if (!xsl)
|
if (!xsl)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument2_Release(doc);
|
IXMLDOMDocument2_Release(doc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_loadXML(doc, _bstr_(szTypeValueXML), &bSucc);
|
hr = IXMLDOMDocument_loadXML(doc, _bstr_(szTypeValueXML), &bSucc);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
||||||
if(bSucc == VARIANT_TRUE)
|
if(bSucc == VARIANT_TRUE)
|
||||||
|
@ -5379,19 +5379,19 @@ static void test_TransformWithLoadingLocalFile(void)
|
||||||
lstrcatW(sXSL, sFileName);
|
lstrcatW(sXSL, sFileName);
|
||||||
lstrcatW(sXSL, sPart2);
|
lstrcatW(sXSL, sPart2);
|
||||||
|
|
||||||
hr = IXMLDOMDocument2_loadXML(xsl, sXSL, &bSucc);
|
hr = IXMLDOMDocument_loadXML(xsl, sXSL, &bSucc);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
ok(bSucc == VARIANT_TRUE, "Expected VARIANT_TRUE got VARIANT_FALSE\n");
|
||||||
if(bSucc == VARIANT_TRUE)
|
if(bSucc == VARIANT_TRUE)
|
||||||
{
|
{
|
||||||
BSTR sResult;
|
BSTR sResult;
|
||||||
|
|
||||||
hr = IXMLDOMDocument_QueryInterface(xsl, &IID_IXMLDOMNode, (LPVOID*)&pNode );
|
hr = IXMLDOMDocument_QueryInterface(xsl, &IID_IXMLDOMNode, (void**)&pNode );
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
/* This will load the temp file via the XSL */
|
/* This will load the temp file via the XSL */
|
||||||
hr = IXMLDOMDocument2_transformNode(doc, pNode, &sResult);
|
hr = IXMLDOMDocument_transformNode(doc, pNode, &sResult);
|
||||||
ok(hr == S_OK, "ret %08x\n", hr );
|
ok(hr == S_OK, "ret %08x\n", hr );
|
||||||
if(hr == S_OK)
|
if(hr == S_OK)
|
||||||
{
|
{
|
||||||
|
@ -5406,8 +5406,8 @@ static void test_TransformWithLoadingLocalFile(void)
|
||||||
SysFreeString(sXSL);
|
SysFreeString(sXSL);
|
||||||
}
|
}
|
||||||
|
|
||||||
IXMLDOMDocument2_Release(doc);
|
IXMLDOMDocument_Release(doc);
|
||||||
IXMLDOMDocument2_Release(xsl);
|
IXMLDOMDocument_Release(xsl);
|
||||||
|
|
||||||
DeleteFile(lpPathBuffer);
|
DeleteFile(lpPathBuffer);
|
||||||
free_bstrs();
|
free_bstrs();
|
||||||
|
@ -6221,19 +6221,19 @@ static void test_get_prefix(void)
|
||||||
START_TEST(domdoc)
|
START_TEST(domdoc)
|
||||||
{
|
{
|
||||||
IXMLDOMDocument *doc;
|
IXMLDOMDocument *doc;
|
||||||
HRESULT r;
|
HRESULT hr;
|
||||||
|
|
||||||
r = CoInitialize( NULL );
|
hr = CoInitialize( NULL );
|
||||||
ok( r == S_OK, "failed to init com\n");
|
ok( hr == S_OK, "failed to init com\n");
|
||||||
if (r != S_OK)
|
if (hr != S_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
test_XMLHTTP();
|
test_XMLHTTP();
|
||||||
|
|
||||||
doc = create_document(&IID_IXMLDOMDocument);
|
hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void**)&doc );
|
||||||
if (!doc)
|
if (hr != S_OK)
|
||||||
{
|
{
|
||||||
win_skip("IXMLDOMDocument is not available (0x%08x)\n", r);
|
win_skip("IXMLDOMDocument is not available (0x%08x)\n", hr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue