Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c8209830
Commit
c8209830
authored
Apr 09, 2023
by
Jactry Zeng
Committed by
Alexandre Julliard
May 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Add tests for IFolderView2_{Get, Set}CurrentFolderFlags().
parent
cd09a224
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
shlview.c
dlls/shell32/tests/shlview.c
+47
-0
No files found.
dlls/shell32/tests/shlview.c
View file @
c8209830
...
...
@@ -1493,10 +1493,26 @@ static void test_newmenu(void)
static
void
test_folder_flags
(
void
)
{
IFolderView2
*
folderview
;
FOLDERSETTINGS
settings
;
IShellFolder
*
desktop
;
IShellView
*
shellview
;
DWORD
flags
;
HRESULT
hr
;
int
i
;
static
const
struct
{
DWORD
mask
,
flags
;
DWORD
expected
;
}
tests
[]
=
{
{
FWF_USESEARCHFOLDER
,
FWF_NONE
,
FWF_NONE
},
{
FWF_NONE
,
FWF_AUTOARRANGE
,
FWF_NONE
},
{
FWF_AUTOARRANGE
,
FWF_AUTOARRANGE
,
FWF_AUTOARRANGE
},
{
FWF_OWNERDATA
,
FWF_AUTOARRANGE
,
FWF_NONE
},
{
FWF_AUTOARRANGE
,
FWF_OWNERDATA
|
FWF_AUTOARRANGE
,
FWF_AUTOARRANGE
},
{
~
FWF_NONE
,
FWF_AUTOARRANGE
,
FWF_AUTOARRANGE
},
};
create_interfaces
(
&
desktop
,
&
shellview
);
...
...
@@ -1507,6 +1523,37 @@ static void test_folder_flags(void)
ok
(
settings
.
fFlags
==
FWF_USESEARCHFOLDER
||
broken
(
!
settings
.
fFlags
)
/* pre vista */
,
"Got flags %#x.
\n
"
,
settings
.
fFlags
);
hr
=
IShellView_QueryInterface
(
shellview
,
&
IID_IFolderView2
,
(
void
**
)
&
folderview
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* pre vista */
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
win_skip
(
"No IFolderView2 for the desktop folder.
\n
"
);
destroy_interfaces
(
desktop
,
shellview
);
return
;
}
hr
=
IFolderView2_GetCurrentFolderFlags
(
folderview
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
flags
=
0xdeadbeef
;
hr
=
IFolderView2_GetCurrentFolderFlags
(
folderview
,
&
flags
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
flags
==
FWF_USESEARCHFOLDER
,
"Got flags %#lx.
\n
"
,
flags
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
++
i
)
{
hr
=
IFolderView2_SetCurrentFolderFlags
(
folderview
,
tests
[
i
].
mask
,
tests
[
i
].
flags
);
todo_wine
ok
(
hr
==
S_OK
,
"Test %u: Got hr %#lx.
\n
"
,
i
,
hr
);
flags
=
0xdeadbeef
;
hr
=
IFolderView2_GetCurrentFolderFlags
(
folderview
,
&
flags
);
todo_wine
ok
(
hr
==
S_OK
,
"Test %u: Got hr %#lx.
\n
"
,
i
,
hr
);
todo_wine
ok
(
flags
==
tests
[
i
].
expected
,
"Test %u: Got flags %#lx.
\n
"
,
i
,
flags
);
hr
=
IFolderView2_SetCurrentFolderFlags
(
folderview
,
~
FWF_NONE
,
FWF_NONE
);
todo_wine
ok
(
hr
==
S_OK
,
"Test %u: Got hr %#lx.
\n
"
,
i
,
hr
);
}
IFolderView2_Release
(
folderview
);
destroy_interfaces
(
desktop
,
shellview
);
}
...
...
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