Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
50c4723a
Commit
50c4723a
authored
Sep 23, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Skip some of IStream invalid parameter tests under Windows 2000 + IE5.
parent
09524be5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
13 deletions
+27
-13
istream.c
dlls/shlwapi/tests/istream.c
+27
-13
No files found.
dlls/shlwapi/tests/istream.c
View file @
50c4723a
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment