Commit 742eb4ba authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msxml3/tests: Added test for ISAXXMLReader_parseURL.

parent b15345d4
...@@ -476,6 +476,9 @@ static void test_saxreader(void) ...@@ -476,6 +476,9 @@ static void test_saxreader(void)
ULARGE_INTEGER liSize; ULARGE_INTEGER liSize;
LARGE_INTEGER liPos; LARGE_INTEGER liPos;
ULONG bytesWritten; ULONG bytesWritten;
HANDLE file;
static const WCHAR testXmlW[] = {'t','e','s','t','.','x','m','l',0};
hr = CoCreateInstance(&CLSID_SAXXMLReader, NULL, CLSCTX_INPROC_SERVER, hr = CoCreateInstance(&CLSID_SAXXMLReader, NULL, CLSCTX_INPROC_SERVER,
&IID_ISAXXMLReader, (LPVOID*)&reader); &IID_ISAXXMLReader, (LPVOID*)&reader);
...@@ -561,6 +564,18 @@ static void test_saxreader(void) ...@@ -561,6 +564,18 @@ static void test_saxreader(void)
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
test_expect_call(CH_ENDTEST); test_expect_call(CH_ENDTEST);
file = CreateFileW(testXmlW, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
WriteFile(file, szTestXML, sizeof(szTestXML)-1, &bytesWritten, NULL);
CloseHandle(file);
expectCall = contentHandlerTest1;
hr = ISAXXMLReader_parseURL(reader, testXmlW);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
test_expect_call(CH_ENDTEST);
DeleteFileW(testXmlW);
ISAXXMLReader_Release(reader); ISAXXMLReader_Release(reader);
} }
......
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