From: zhaofeng Date: Wed, 24 Feb 2021 06:58:16 +0000 (+0800) Subject: [common][speech][call getVoices by getting onvoiceschanged event] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4fc4fcb53793e7ba79652c29b90c5e8ab67d04a;p=test%2Ftct%2Fweb%2Fapi.git [common][speech][call getVoices by getting onvoiceschanged event] Change-Id: I7897d05ab2fcffc4b2e7b070cc12e37631f7ae1a Signed-off-by: zhaofeng --- diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_default_attribute.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_default_attribute.html index 55a789bea..13923efd5 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_default_attribute.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_default_attribute.html @@ -34,12 +34,21 @@ Authors: //==== SPEC_URL https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice //==== TEST_CRITERIA AE AT ARO -test(function () { +setup ({timeout: 9000}); + +var t = async_test(document.title, {timeout: 9000}) + +t.step(function () { var speech, voices; speech = window.speechSynthesis; - voices = speech.getVoices(); - check_readonly(voices[0], "default", voices[0].default, "boolean", true); -}, document.title); + + speech.onvoiceschanged = t.step_func(function(e) { + voices = speech.getVoices(); + check_readonly(voices[0], "default", voices[0].default, "boolean", false); + t.done(); + }); + +}); diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_extend.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_extend.html index 567964dbf..58fac3901 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_extend.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_extend.html @@ -34,12 +34,21 @@ Authors: //==== SPEC_URL https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice //==== TEST_CRITERIA OBX -test(function () { +setup ({timeout: 9000}); + +var t = async_test(document.title, {timeout: 9000}) + +t.step(function () { var speech, voices; speech = window.speechSynthesis; - voices = speech.getVoices(); - check_extensibility(voices[0]); -}, document.title); + + speech.onvoiceschanged = t.step_func(function(e) { + voices = speech.getVoices(); + check_extensibility(voices[0]); + t.done(); + }); + +}); diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_lang_attribute.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_lang_attribute.html index 33f00d25a..ec8c676fb 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_lang_attribute.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_lang_attribute.html @@ -33,13 +33,21 @@ Authors: //==== SPEC Tizen Web API:TBD:Speech:SpeechSynthesisVoice:lang A //==== SPEC_URL https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice //==== TEST_CRITERIA AE AT ARO +setup ({timeout: 9000}); -test(function () { +var t = async_test(document.title, {timeout: 9000}) + +t.step(function () { var speech, voices; speech = window.speechSynthesis; - voices = speech.getVoices(); - check_readonly(voices[0], "lang", voices[0].lang, "string", "dummyLang"); -}, document.title); + + speech.onvoiceschanged = t.step_func(function(e) { + voices = speech.getVoices(); + check_readonly(voices[0], "lang", voices[0].lang, "string", "dummyLang"); + t.done(); + }); + +}); diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_localService_attribute.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_localService_attribute.html index 6d62ded1c..516d301cc 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_localService_attribute.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_localService_attribute.html @@ -34,12 +34,21 @@ Authors: //==== SPEC_URL https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice //==== TEST_CRITERIA AE AT ARO -test(function () { +setup ({timeout: 9000}); + +var t = async_test(document.title, {timeout: 9000}) + +t.step(function () { var speech, voices; speech = window.speechSynthesis; - voices = speech.getVoices(); - check_readonly(voices[0], "localService", voices[0].localService, "boolean", true); -}, document.title); + + speech.onvoiceschanged = t.step_func(function(e) { + voices = speech.getVoices(); + check_readonly(voices[0], "localService", voices[0].localService, "boolean", false); + t.done(); + }); + +}); diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_name_attribute.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_name_attribute.html index 2c2335f48..532546d00 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_name_attribute.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_name_attribute.html @@ -34,12 +34,21 @@ Authors: //==== SPEC_URL https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice //==== TEST_CRITERIA AE AT ARO -test(function () { +setup ({timeout: 9000}); + +var t = async_test(document.title, {timeout: 9000}) + +t.step(function () { var speech, voices; speech = window.speechSynthesis; - voices = speech.getVoices(); - check_readonly(voices[0], "name", voices[0].name, "string", "dummyName"); -}, document.title); + + speech.onvoiceschanged = t.step_func(function(e) { + voices = speech.getVoices(); + check_readonly(voices[0], "name", voices[0].name, "string", "dummyName"); + t.done(); + }); + +}); diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_voiceURI_attribute.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_voiceURI_attribute.html index 430631120..4d1ad0f2f 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_voiceURI_attribute.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_voiceURI_attribute.html @@ -34,12 +34,21 @@ Authors: //==== SPEC_URL https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice //==== TEST_CRITERIA AE AT ARO -test(function () { +setup ({timeout: 9000}); + +var t = async_test(document.title, {timeout: 9000}) + +t.step(function () { var speech, voices; speech = window.speechSynthesis; - voices = speech.getVoices(); - check_readonly(voices[0], "voiceURI", voices[0].voiceURI, "string", "dummyURI"); -}, document.title); + + speech.onvoiceschanged = t.step_func(function(e) { + voices = speech.getVoices(); + check_readonly(voices[0], "voiceURI", voices[0].voiceURI, "string", "dummyURI"); + t.done(); + }); + +}); diff --git a/common/tct-speech-w3c-tests/tests.full.xml b/common/tct-speech-w3c-tests/tests.full.xml index eb60b20ce..25532fdd9 100755 --- a/common/tct-speech-w3c-tests/tests.full.xml +++ b/common/tct-speech-w3c-tests/tests.full.xml @@ -1482,19 +1482,19 @@ - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_default_attribute.html - + https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#SpeechSynthesisVoice TBD - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_extend.html @@ -1506,7 +1506,7 @@ - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_lang_attribute.html @@ -1518,7 +1518,7 @@ - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_localService_attribute.html @@ -1530,7 +1530,7 @@ - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_name_attribute.html @@ -1542,7 +1542,7 @@ - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_voiceURI_attribute.html diff --git a/common/tct-speech-w3c-tests/tests.xml b/common/tct-speech-w3c-tests/tests.xml index 096ec0cd6..c2feac268 100755 --- a/common/tct-speech-w3c-tests/tests.xml +++ b/common/tct-speech-w3c-tests/tests.xml @@ -838,32 +838,32 @@ /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_volume_attribute.html - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_default_attribute.html - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_extend.html - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_lang_attribute.html - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_localService_attribute.html - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_name_attribute.html - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisVoice_voiceURI_attribute.html