From: Bernhard K��lbl besentv@gmail.com
--- dlls/windows.media.speech/tests/speech.c | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c index 7429e0822d4..cc4a4e2e472 100644 --- a/dlls/windows.media.speech/tests/speech.c +++ b/dlls/windows.media.speech/tests/speech.c @@ -1017,11 +1017,44 @@ static void test_SpeechSynthesizer(void) hr = IInspectable_QueryInterface(inspectable, &IID_IClosable, (void **)&closable); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ /* Test ISpeechSynthesizer2 iface */ hr = IInspectable_QueryInterface(inspectable, &IID_ISpeechSynthesizer2, (void **)&synthesizer2); ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); /* Requires Win10 >= 1703 */
if (hr == S_OK) { + ISpeechSynthesizerOptions *options; + + hr = ISpeechSynthesizer2_get_Options(synthesizer2, &options); + todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + if (hr == S_OK) + { + ISpeechSynthesizerOptions2 *options2; + ISpeechSynthesizerOptions3 *options3; + + hr = ISpeechSynthesizerOptions_QueryInterface(options, &IID_ISpeechSynthesizerOptions2, (void **)&options2); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); /* Requires Win10 >= 1709 */ + + if (hr == S_OK) + { + ref = ISpeechSynthesizerOptions2_Release(options2); + ok(ref == 2, "Got unexpected ref %lu.\n", ref); + } + + hr = ISpeechSynthesizerOptions_QueryInterface(options, &IID_ISpeechSynthesizerOptions3, (void **)&options3); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Got unexpected hr %#lx.\n", hr); /* Requires Win10 >= 1803 */ + + if (hr == S_OK) + { + ref = ISpeechSynthesizerOptions3_Release(options3); + ok(ref == 2, "Got unexpected ref %lu.\n", ref); + } + + ref = ISpeechSynthesizerOptions_Release(options); + ok(ref == 1, "Got unexpected ref %lu.\n", ref); + } + ref = ISpeechSynthesizer2_Release(synthesizer2); ok(ref == 3, "Got unexpected ref %lu.\n", ref); }