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
e1c4035e
Commit
e1c4035e
authored
Jan 14, 2023
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Jan 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.speech/tests: Check if stopping the session resets the paused state.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
parent
9515736a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
3 deletions
+47
-3
speech.c
dlls/windows.media.speech/tests/speech.c
+47
-3
No files found.
dlls/windows.media.speech/tests/speech.c
View file @
e1c4035e
...
...
@@ -1787,8 +1787,8 @@ static void test_Recognition(void)
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Paused
||
/* Broken on Win10 1507 */
broken
(
recog_state
==
SpeechRecognizerState_Capturing
)
,
"recog_state was %u.
\n
"
,
recog_state
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Paused
||
broken
(
recog_state
==
SpeechRecognizerState_Capturing
)
/* Broken on Win10 1507 */
,
"recog_state was %u.
\n
"
,
recog_state
);
/* Check what happens if we try to pause again, when the session is already paused. */
hr
=
ISpeechContinuousRecognitionSession_PauseAsync
(
session
,
&
action2
);
...
...
@@ -1844,7 +1844,7 @@ static void test_Recognition(void)
set
=
SetEvent
(
action_handler
.
event_block
);
ok
(
set
==
TRUE
,
"Event 'event_block' wasn't set.
\n
"
);
ok
(
!
WaitForSingleObject
(
put_thread
,
1000
),
"Wait for put_thread failed.
\n
"
);
ok
(
!
WaitForSingleObject
(
put_thread
,
1000
),
"Wait for put_thread failed.
\n
"
);
IAsyncInfo_Release
(
info
);
CloseHandle
(
action_handler
.
event_finished
);
...
...
@@ -1866,6 +1866,50 @@ static void test_Recognition(void)
ok
(
hr
==
COR_E_INVALIDOPERATION
,
"ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.
\n
"
,
hr
);
ok
(
action
==
NULL
,
"action was %p.
\n
"
,
action
);
/* Test, if Start/StopAsync resets the pause state. */
hr
=
ISpeechContinuousRecognitionSession_StartAsync
(
session
,
&
action
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_StartAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_void
(
action
,
&
action_handler
);
IAsyncAction_Release
(
action
);
hr
=
ISpeechContinuousRecognitionSession_PauseAsync
(
session
,
&
action
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_PauseAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_void
(
action
,
&
action_handler
);
IAsyncAction_Release
(
action
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Paused
||
broken
(
recog_state
==
SpeechRecognizerState_Capturing
)
/* Broken on Win10 1507 */
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechContinuousRecognitionSession_StopAsync
(
session
,
&
action
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_PauseAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_void
(
action
,
&
action_handler
);
IAsyncAction_Release
(
action
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Idle
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechContinuousRecognitionSession_StartAsync
(
session
,
&
action
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_PauseAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_void
(
action
,
&
action_handler
);
IAsyncAction_Release
(
action
);
recog_state
=
0xdeadbeef
;
hr
=
ISpeechRecognizer2_get_State
(
recognizer2
,
&
recog_state
);
todo_wine
ok
(
hr
==
S_OK
,
"ISpeechRecognizer2_get_State failed, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
recog_state
==
SpeechRecognizerState_Capturing
||
broken
(
recog_state
==
SpeechRecognizerState_Idle
)
/* Sometimes Windows is a little behind. */
,
"recog_state was %u.
\n
"
,
recog_state
);
hr
=
ISpeechContinuousRecognitionSession_StopAsync
(
session
,
&
action
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_PauseAsync failed, hr %#lx.
\n
"
,
hr
);
await_async_void
(
action
,
&
action_handler
);
IAsyncAction_Release
(
action
);
hr
=
ISpeechContinuousRecognitionSession_remove_ResultGenerated
(
session
,
token
);
ok
(
hr
==
S_OK
,
"ISpeechContinuousRecognitionSession_remove_ResultGenerated failed, hr %#lx.
\n
"
,
hr
);
...
...
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