Author: akhaldi
Date: Sun Sep 17 22:54:17 2017
New Revision: 75881
URL:
http://svn.reactos.org/svn/reactos?rev=75881&view=rev
Log:
[INETCOMM_WINETEST] Sync with Wine Staging 2.16. CORE-13762
Modified:
trunk/rostests/winetests/inetcomm/mimeole.c
Modified: trunk/rostests/winetests/inetcomm/mimeole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/mimeol…
==============================================================================
--- trunk/rostests/winetests/inetcomm/mimeole.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/inetcomm/mimeole.c [iso-8859-1] Sun Sep 17 22:54:17 2017
@@ -197,9 +197,17 @@
MIMEPARAMINFO *param_info;
IMimeAllocator *alloc;
BODYOFFSETS offsets;
+ CLSID clsid;
hr = CoCreateInstance(&CLSID_IMimeBody, NULL, CLSCTX_INPROC_SERVER,
&IID_IMimeBody, (void**)&body);
ok(hr == S_OK, "ret %08x\n", hr);
+
+ hr = IMimeBody_GetClassID(body, NULL);
+ ok(hr == E_INVALIDARG, "ret %08x\n", hr);
+
+ hr = IMimeBody_GetClassID(body, &clsid);
+ ok(hr == S_OK, "ret %08x\n", hr);
+ ok(IsEqualGUID(&clsid, &IID_IMimeBody), "got %s\n",
wine_dbgstr_guid(&clsid));
hr = IMimeBody_GetHandle(body, &handle);
ok(hr == MIME_E_NO_DATA, "ret %08x\n", hr);
@@ -445,14 +453,14 @@
Stream_Clone
};
-static TestStream *create_test_stream(void)
+static IStream *create_test_stream(void)
{
TestStream *stream;
stream = HeapAlloc(GetProcessHeap(), 0, sizeof(*stream));
stream->IStream_iface.lpVtbl = &StreamVtbl;
stream->ref = 1;
stream->pos = 0;
- return stream;
+ return &stream->IStream_iface;
}
#define test_stream_read(a,b,c,d) _test_stream_read(__LINE__,a,b,c,d)
@@ -474,8 +482,7 @@
static void test_SetData(void)
{
- IStream *stream, *stream2;
- TestStream *test_stream;
+ IStream *stream, *stream2, *test_stream;
IMimeBody *body;
HRESULT hr;
@@ -492,7 +499,7 @@
IStream_Release(stream);
test_stream = create_test_stream();
- hr = IMimeBody_SetData(body, IET_BINARY, "text", "plain",
&IID_IStream, &test_stream->IStream_iface);
+ hr = IMimeBody_SetData(body, IET_BINARY, "text", "plain",
&IID_IStream, test_stream);
ok(hr == S_OK, "ret %08x\n", hr);
hr = IMimeBody_IsContentType(body, "text", "plain");
@@ -507,7 +514,7 @@
CHECK_CALLED(Stream_Stat);
CHECK_CALLED(Stream_Seek_END);
ok(hr == S_OK, "GetData failed %08x\n", hr);
- ok(stream != &test_stream->IStream_iface, "unexpected stream\n");
+ ok(stream != test_stream, "unexpected stream\n");
SET_EXPECT(Stream_Seek);
SET_EXPECT(Stream_Read);
@@ -538,7 +545,7 @@
IStream_Release(stream);
IStream_Release(stream2);
- IStream_Release(&test_stream->IStream_iface);
+ IStream_Release(test_stream);
stream = create_stream_from_string(" \t\r\n|}~YWJj ZGV|}~mZw== \t"); /*
"abcdefg" in base64 obscured by invalid chars */
hr = IMimeBody_SetData(body, IET_BASE64, "text", "plain",
&IID_IStream, stream);