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
22aa88a1
Commit
22aa88a1
authored
Jun 09, 2022
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Jun 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.speech/tests: Handle a possible race condition.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
parent
d95681aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
speech.c
dlls/windows.media.speech/tests/speech.c
+20
-13
No files found.
dlls/windows.media.speech/tests/speech.c
View file @
22aa88a1
...
...
@@ -1122,26 +1122,33 @@ static void test_SpeechRecognizer(void)
compilation_result
=
(
void
*
)
0xdeadbeef
;
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_GetResults
(
operation
,
&
compilation_result
);
ok
(
hr
==
E_ILLEGAL_METHOD_CALL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
compilation_result
==
(
void
*
)
0xdeadbeef
,
"Compilation result had value %p.
\n
"
,
compilation_result
);
ok
(
hr
==
E_ILLEGAL_METHOD_CALL
||
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
await_async_inspectable
((
IAsyncOperation_IInspectable
*
)
operation
,
&
compilation_handler
,
&
IID_IAsyncOperationCompletedHandler_SpeechRecognitionCompilationResult
);
check_async_info
((
IInspectable
*
)
operation
,
1
,
Completed
,
S_OK
);
if
(
hr
==
E_ILLEGAL_METHOD_CALL
)
/* Sometimes the operation could have already finished here, */
/* if so skip waiting and getting the results a second time. */
{
ok
(
compilation_result
==
(
void
*
)
0xdeadbeef
,
"Compilation result had value %p.
\n
"
,
compilation_result
);
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_put_Completed
(
operation
,
NULL
);
ok
(
hr
==
E_ILLEGAL_DELEGATE_ASSIGNMENT
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
await_async_inspectable
((
IAsyncOperation_IInspectable
*
)
operation
,
&
compilation_handler
,
&
IID_IAsyncOperationCompletedHandler_SpeechRecognitionCompilationResult
);
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_get_Completed
(
operation
,
&
handler
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_put_Completed
(
operation
,
NULL
);
ok
(
hr
==
E_ILLEGAL_DELEGATE_ASSIGNMENT
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
compilation_result
=
(
void
*
)
0xdeadbeef
;
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_GetResults
(
operation
,
&
compilation_result
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_get_Completed
(
operation
,
&
handler
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
compilation_result
=
(
void
*
)
0xdeadbeef
;
hr
=
IAsyncOperation_SpeechRecognitionCompilationResult_GetResults
(
operation
,
&
compilation_result
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
}
ok
(
compilation_result
!=
(
void
*
)
0xdeadbeef
,
"Compilation result had value %p.
\n
"
,
compilation_result
);
check_interface
(
compilation_result
,
&
IID_IAgileObject
,
TRUE
);
check_async_info
((
IInspectable
*
)
operation
,
1
,
Completed
,
S_OK
);
hr
=
ISpeechRecognitionCompilationResult_get_Status
(
compilation_result
,
&
result_status
);
ok
(
hr
==
S_OK
,
"ISpeechRecognitionCompilationResult_get_Status failed, hr %#lx.
\n
"
,
hr
);
ok
(
result_status
==
SpeechRecognitionResultStatus_Success
,
"Got unexpected status %#x.
\n
"
,
result_status
);
...
...
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