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
5f32efcf
Commit
5f32efcf
authored
Apr 08, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/tests: Add some tests for IPersistPropertyBag on the AVI compressor.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
71239f31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
1 deletion
+87
-1
avico.c
dlls/qcap/tests/avico.c
+87
-1
No files found.
dlls/qcap/tests/avico.c
View file @
5f32efcf
...
...
@@ -330,6 +330,89 @@ static LRESULT CALLBACK driver_proc(DWORD_PTR id, HDRVR driver, UINT msg,
return
0
;
}
static
HRESULT
WINAPI
property_bag_QueryInterface
(
IPropertyBag
*
iface
,
REFIID
iid
,
void
**
out
)
{
ok
(
0
,
"Unexpected call (iid %s).
\n
"
,
wine_dbgstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
property_bag_AddRef
(
IPropertyBag
*
iface
)
{
ok
(
0
,
"Unexpected call.
\n
"
);
return
2
;
}
static
ULONG
WINAPI
property_bag_Release
(
IPropertyBag
*
iface
)
{
ok
(
0
,
"Unexpected call.
\n
"
);
return
1
;
}
static
const
WCHAR
fcchandlerW
[]
=
{
'F'
,
'c'
,
'c'
,
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
'r'
,
0
};
static
BSTR
ppb_handler
;
static
unsigned
int
ppb_got_read
;
static
HRESULT
WINAPI
property_bag_Read
(
IPropertyBag
*
iface
,
const
WCHAR
*
name
,
VARIANT
*
var
,
IErrorLog
*
log
)
{
ok
(
!
lstrcmpW
(
name
,
fcchandlerW
),
"Got unexpected name %s.
\n
"
,
wine_dbgstr_w
(
name
));
todo_wine
ok
(
V_VT
(
var
)
==
VT_BSTR
,
"Got unexpected type %u.
\n
"
,
V_VT
(
var
));
ok
(
!
log
,
"Got unexpected error log %p.
\n
"
,
log
);
V_BSTR
(
var
)
=
SysAllocString
(
ppb_handler
);
ppb_got_read
++
;
return
S_OK
;
}
static
HRESULT
WINAPI
property_bag_Write
(
IPropertyBag
*
iface
,
const
WCHAR
*
name
,
VARIANT
*
var
)
{
ok
(
0
,
"Unexpected call (name %s).
\n
"
,
wine_dbgstr_w
(
name
));
return
E_FAIL
;
}
static
const
IPropertyBagVtbl
property_bag_vtbl
=
{
property_bag_QueryInterface
,
property_bag_AddRef
,
property_bag_Release
,
property_bag_Read
,
property_bag_Write
,
};
static
void
test_property_bag
(
IMoniker
*
mon
)
{
IPropertyBag
property_bag
=
{
&
property_bag_vtbl
};
IPropertyBag
*
devenum_bag
;
IPersistPropertyBag
*
ppb
;
VARIANT
var
;
HRESULT
hr
;
ULONG
ref
;
hr
=
IMoniker_BindToStorage
(
mon
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
void
**
)
&
devenum_bag
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
VariantInit
(
&
var
);
hr
=
IPropertyBag_Read
(
devenum_bag
,
fcchandlerW
,
&
var
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ppb_handler
=
V_BSTR
(
&
var
);
hr
=
CoCreateInstance
(
&
CLSID_AVICo
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IPersistPropertyBag
,
(
void
**
)
&
ppb
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPersistPropertyBag_InitNew
(
ppb
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ppb_got_read
=
0
;
hr
=
IPersistPropertyBag_Load
(
ppb
,
&
property_bag
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
ppb_got_read
==
1
,
"Got %u calls to Read().
\n
"
,
ppb_got_read
);
ref
=
IPersistPropertyBag_Release
(
ppb
);
ok
(
!
ref
,
"Got unexpected refcount %d.
\n
"
,
ref
);
VariantClear
(
&
var
);
IPropertyBag_Release
(
devenum_bag
);
}
START_TEST
(
avico
)
{
static
const
WCHAR
test_display_name
[]
=
{
'@'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
':'
,
...
...
@@ -373,8 +456,11 @@ START_TEST(avico)
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
CoTaskMemFree
(
name
);
if
(
!
memcmp
(
name
,
test_display_name
,
11
*
sizeof
(
WCHAR
)))
test_property_bag
(
mon
);
CoTaskMemFree
(
name
);
IMoniker_Release
(
mon
);
}
...
...
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