msxml3/tests: Added test for ISAXXMLReader_parseURL.

This commit is contained in:
Piotr Caban 2008-07-27 19:54:55 +02:00 committed by Alexandre Julliard
parent b15345d4a8
commit 742eb4ba08
1 changed files with 15 additions and 0 deletions

View File

@ -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)
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);
} }