From: zhaofeng Date: Tue, 9 Mar 2021 08:06:42 +0000 (+0800) Subject: [common][Specch][DPTTIZEN-3223, add release before call pause & resume callback ] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40986949d959ec9aca58f33c692cc429bab3196e;p=test%2Ftct%2Fweb%2Fapi.git [common][Specch][DPTTIZEN-3223, add release before call pause & resume callback ] Change-Id: I1391fcb0ecb62531c10f5a9bf87cbc778d4353a1 Signed-off-by: zhaofeng --- diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html index f3fcc3064..584f78aa5 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html @@ -40,6 +40,7 @@ setup ({timeout: 90000}); var t = async_test(document.title, {timeout: 90000}), utterance; t.step(function () { + speechSynthesis.cancel(); utterance = new SpeechSynthesisUtterance(); utterance.text = "this is a test speech"; diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html index 3e568e853..b68b295dc 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html @@ -40,6 +40,7 @@ setup ({timeout: 90000}); var t = async_test(document.title, {timeout: 90000}), utterance; t.step(function () { + speechSynthesis.cancel(); utterance = new SpeechSynthesisUtterance(); utterance.text = "this is a test speech. Test if fired when and if this utterance is paused mid-utterance"; diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html index 812712568..366f99d5e 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html @@ -40,12 +40,14 @@ setup({timeout: 5000}); var t = async_test(document.title, {timeout: 5000}), speechMessage, returnValue; t.step(function () { + speechSynthesis.cancel(); speechMessage = new SpeechSynthesisUtterance(); speechMessage.text = "test is goin on test is goin on test is goin on"; speechMessage.onpause = t.step_func(function () { assert_equals(returnValue, undefined, "returnValue should be undefined"); assert_equals(window.speechSynthesis.paused, true, "paused should be true"); + speechSynthesis.cancel(); t.done(); }); diff --git a/common/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html b/common/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html index 07d4a4c45..e248241e3 100755 --- a/common/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html +++ b/common/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html @@ -40,12 +40,14 @@ setup({timeout: 5000}); var t = async_test(document.title, {timeout: 5000}), speechMessage, returnValue; t.step(function () { + speechSynthesis.cancel(); speechMessage = new SpeechSynthesisUtterance(); speechMessage.text = "test is going on"; speechMessage.onresume = t.step_func(function () { assert_equals(returnValue, undefined, "returnValue should be undefined"); assert_equals(window.speechSynthesis.speaking, true, "speaking should be true"); + speechSynthesis.cancel(); t.done(); }); diff --git a/common/tct-speech-w3c-tests/tests.xml b/common/tct-speech-w3c-tests/tests.xml index c2feac268..63d87d404 100755 --- a/common/tct-speech-w3c-tests/tests.xml +++ b/common/tct-speech-w3c-tests/tests.xml @@ -728,6 +728,26 @@ + + + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html + + + + + /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html + + + + + /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html + + + + + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html + + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisEvent_charIndex_attribute.html @@ -788,26 +808,11 @@ /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onend.html - - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onerror.html - - - - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html - - - - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onstart.html @@ -913,11 +918,7 @@ /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_onvoiceschanged_attibute.html - - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html - - + /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pause_exist.html @@ -938,11 +939,6 @@ /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pending_attibute.html - - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html - - /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_resume_exist.html @@ -979,6 +975,11 @@ /opt/tct-speech-w3c-tests/speech/SpeechSynthesis_speaking_attibute.html + + + /opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onerror.html + +