Commit 50c4723a authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

shlwapi/tests: Skip some of IStream invalid parameter tests under Windows 2000 + IE5.

parent 09524be5
......@@ -35,6 +35,7 @@ static HRESULT (WINAPI *pSHCreateStreamOnFileA)(LPCSTR file, DWORD mode, IStream
static HRESULT (WINAPI *pSHCreateStreamOnFileW)(LPCWSTR file, DWORD mode, IStream **stream);
static HRESULT (WINAPI *pSHCreateStreamOnFileEx)(LPCWSTR file, DWORD mode, DWORD attributes, BOOL create, IStream *template, IStream **stream);
static BOOL is_win2000_IE5 = FALSE;
static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
{
......@@ -76,40 +77,53 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
ret = stream->lpVtbl->Write(stream, NULL, 0, &count);
if (mode == STGM_READ)
ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */,
"expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret);
{
ok(ret == STG_E_ACCESSDENIED /* XP */ || broken(ret == S_OK) /* Win2000 + IE5 */,
"expected STG_E_ACCESSDENIED, got 0x%08x\n", ret);
if (ret == S_OK)
is_win2000_IE5 = TRUE;
}
else
ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret);
/* IStream::Write calls below hang under Win2000 + IE5, Win2000 + IE6 SP1
* and newer Windows versions pass these tests.
*/
if (is_win2000_IE5)
{
win_skip("broken IStream::Write implementation (win2000)\n");
return;
}
strcpy(data, "Hello");
ret = stream->lpVtbl->Write(stream, data, 5, NULL);
if (mode == STGM_READ)
ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */,
"expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret);
ok(ret == STG_E_ACCESSDENIED,
"expected STG_E_ACCESSDENIED, got 0x%08x\n", ret);
else
ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret);
strcpy(data, "Hello");
ret = stream->lpVtbl->Write(stream, data, 0, NULL);
if (mode == STGM_READ)
ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */,
"expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret);
ok(ret == STG_E_ACCESSDENIED,
"expected STG_E_ACCESSDENIED, got 0x%08x\n", ret);
else
ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret);
strcpy(data, "Hello");
ret = stream->lpVtbl->Write(stream, data, 0, &count);
if (mode == STGM_READ)
ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */,
"expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret);
ok(ret == STG_E_ACCESSDENIED,
"expected STG_E_ACCESSDENIED, got 0x%08x\n", ret);
else
ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret);
strcpy(data, "Hello");
ret = stream->lpVtbl->Write(stream, data, 3, &count);
if (mode == STGM_READ)
ok(ret == STG_E_ACCESSDENIED /* XP */ || ret == S_OK /* 2000 */,
"expected STG_E_ACCESSDENIED or S_OK, got 0x%08x\n", ret);
ok(ret == STG_E_ACCESSDENIED,
"expected STG_E_ACCESSDENIED, got 0x%08x\n", ret);
else
ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret);
......@@ -119,8 +133,8 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
ok(ret == S_OK, "expected S_OK, got 0x%08x\n", ret);
ret = IStream_Seek(stream, zero, 20, NULL);
ok(ret == E_INVALIDARG /* XP */ || ret == S_OK /* 2000 */,
"expected E_INVALIDARG or S_OK, got 0x%08x\n", ret);
ok(ret == E_INVALIDARG,
"expected E_INVALIDARG, got 0x%08x\n", ret);
/* IStream::CopyTo */
......@@ -172,7 +186,7 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode)
/* IStream::Stat */
ret = IStream_Stat(stream, NULL, 0);
ok(ret == STG_E_INVALIDPOINTER /* XP */ || ret == E_NOTIMPL /* 2000 */,
ok(ret == STG_E_INVALIDPOINTER,
"expected STG_E_INVALIDPOINTER or E_NOTIMPL, got 0x%08x\n", ret);
/* IStream::Clone */
......
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