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
10af2e50
Commit
10af2e50
authored
Nov 24, 2022
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media/tests: Add Closed Caption Properties tests.
parent
7c0b3a40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
captions.c
dlls/windows.media/tests/captions.c
+70
-0
No files found.
dlls/windows.media/tests/captions.c
View file @
10af2e50
...
...
@@ -26,7 +26,10 @@
#include "roapi.h"
#define WIDL_using_Windows_Foundation
#define WIDL_using_Windows_Foundation_Collections
#include "windows.foundation.h"
#define WIDL_using_Windows_UI
#include "windows.ui.h"
#define WIDL_using_Windows_Media_ClosedCaptioning
#include "windows.media.closedcaptioning.h"
...
...
@@ -55,6 +58,13 @@ static void test_CaptionStatics(void)
HSTRING
str
;
HRESULT
hr
;
LONG
ref
;
/* Properties */
ClosedCaptionColor
color
;
ClosedCaptionOpacity
opacity
;
ClosedCaptionSize
size
;
ClosedCaptionStyle
style
;
ClosedCaptionEdgeEffect
effect
;
Color
computed_color
;
hr
=
WindowsCreateString
(
caption_properties_name
,
wcslen
(
caption_properties_name
),
&
str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
...
...
@@ -75,6 +85,66 @@ static void test_CaptionStatics(void)
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IClosedCaptionPropertiesStatics
,
(
void
**
)
&
caption_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
color
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_FontColor
(
caption_statics
,
&
color
);
todo_wine
ok
(
hr
==
S_OK
,
"get_FontColor returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
color
==
ClosedCaptionColor_Default
,
"expected default font color, got %d
\n
"
,
color
);
hr
=
IClosedCaptionPropertiesStatics_get_ComputedFontColor
(
caption_statics
,
&
computed_color
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"get_ComputedFontColor returned %#lx
\n
"
,
hr
);
hr
=
IClosedCaptionPropertiesStatics_get_ComputedFontColor
(
caption_statics
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"get_ComputedFontColor returned %#lx
\n
"
,
hr
);
opacity
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_FontOpacity
(
caption_statics
,
&
opacity
);
todo_wine
ok
(
hr
==
S_OK
,
"get_FontOpacity returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
opacity
==
ClosedCaptionOpacity_Default
,
"expected default font opacity, got %d
\n
"
,
opacity
);
size
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_FontSize
(
caption_statics
,
&
size
);
todo_wine
ok
(
hr
==
S_OK
,
"get_FontSize returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
size
==
ClosedCaptionSize_Default
,
"expected default font size, got %d
\n
"
,
size
);
style
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_FontStyle
(
caption_statics
,
&
style
);
todo_wine
ok
(
hr
==
S_OK
,
"get_FontStyle returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
style
==
ClosedCaptionStyle_Default
,
"expected default font style, got %d
\n
"
,
style
);
effect
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_FontEffect
(
caption_statics
,
&
effect
);
todo_wine
ok
(
hr
==
S_OK
,
"get_FontEffect returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
effect
==
ClosedCaptionEdgeEffect_Default
,
"expected default font effect, got %d
\n
"
,
effect
);
color
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_BackgroundColor
(
caption_statics
,
&
color
);
todo_wine
ok
(
hr
==
S_OK
,
"get_BackgroundColor returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
color
==
ClosedCaptionColor_Default
,
"expected default background color, got %d
\n
"
,
color
);
hr
=
IClosedCaptionPropertiesStatics_get_ComputedBackgroundColor
(
caption_statics
,
&
computed_color
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"get_ComputedBackgroundColor returned %#lx
\n
"
,
hr
);
hr
=
IClosedCaptionPropertiesStatics_get_ComputedBackgroundColor
(
caption_statics
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"get_ComputedBackgroundColor returned %#lx
\n
"
,
hr
);
opacity
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_BackgroundOpacity
(
caption_statics
,
&
opacity
);
todo_wine
ok
(
hr
==
S_OK
,
"get_BackgroundOpacity returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
opacity
==
ClosedCaptionOpacity_Default
,
"expected default background opacity, got %d
\n
"
,
opacity
);
color
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_RegionColor
(
caption_statics
,
&
color
);
todo_wine
ok
(
hr
==
S_OK
,
"get_RegionColor returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
color
==
ClosedCaptionColor_Default
,
"expected default region color, got %d
\n
"
,
color
);
hr
=
IClosedCaptionPropertiesStatics_get_ComputedRegionColor
(
caption_statics
,
&
computed_color
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"get_ComputedRegionColor returned %#lx
\n
"
,
hr
);
hr
=
IClosedCaptionPropertiesStatics_get_ComputedRegionColor
(
caption_statics
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"get_ComputedRegionColor returned %#lx
\n
"
,
hr
);
opacity
=
0xdeadbeef
;
hr
=
IClosedCaptionPropertiesStatics_get_RegionOpacity
(
caption_statics
,
&
opacity
);
todo_wine
ok
(
hr
==
S_OK
,
"get_RegionOpacity returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
opacity
==
ClosedCaptionOpacity_Default
,
"expected default region opacity, got %d
\n
"
,
opacity
);
ref
=
IClosedCaptionPropertiesStatics_Release
(
caption_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
...
...
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