[common][Specch][DPTTIZEN-3223, add release before call pause & resume callback ] 59/254759/1
authorzhaofeng <feng.zhao@samsung.com>
Tue, 9 Mar 2021 08:06:42 +0000 (16:06 +0800)
committerzhaofeng <feng.zhao@samsung.com>
Tue, 9 Mar 2021 08:06:48 +0000 (16:06 +0800)
Change-Id: I1391fcb0ecb62531c10f5a9bf87cbc778d4353a1
Signed-off-by: zhaofeng <feng.zhao@samsung.com>
common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html
common/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html
common/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html
common/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html
common/tct-speech-w3c-tests/tests.xml

index f3fcc30645865acda9d2d8f86e28c69011b5a98e..584f78aa5110affa6c48f5972ced358f2a5f25e2 100755 (executable)
@@ -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";
 
index 3e568e85303f3aca836796d5bb3351bfcc3be576..b68b295dc26c7e9430bd3bb0dbca860b74078e32 100755 (executable)
@@ -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";
 
index 812712568e53641cfa83004586cdb5bccdbba872..366f99d5ee130c65ca5d1259719ab3774a336507 100755 (executable)
@@ -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();
     });
 
index 07d4a4c4585111d88caea9ac3973b30bfc934e3c..e248241e3c650d1f2df26a88acd5f5b84c908b8d 100755 (executable)
@@ -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();
     });
 
index c2feac26891afb166bb66e73d79d595130cfaa52..63d87d4047a741bab3e1340d56c98a85aa66dcb9 100755 (executable)
       <capabilities>
         <capability name="http://tizen.org/feature/speech.synthesis"/>
       </capabilities>
+      <testcase purpose="Check if SpeechSynthesisUtterance::onpause eventHandler can be fired properly" onload_delay="90" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onpause">
+        <description>
+          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SpeechSynthesis::resume() method works properly" onload_delay="5" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesis_resume">
+        <description>
+          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SpeechSynthesis::pause() method works properly" onload_delay="5" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesis_pause">
+        <description>
+          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if SpeechSynthesisUtterance::onresume eventHandler can be fired properly" onload_delay="90" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onresume">
+        <description>
+          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if SpeechSynthesisEvent::charIndex exists, has type unsigned long and is readonly" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisEvent_charIndex_attribute">
         <description>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisEvent_charIndex_attribute.html</test_script_entry>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onend.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Test whether SpeechSynthesisUtterance::onerror is called with argument of proper type" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onerror">
-        <description>
-          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onerror.html</test_script_entry>
-        </description>
-      </testcase>
 <!--      <testcase purpose="Check if SpeechSynthesisUtterance::onmark eventHandler can be fired properly" onload_delay="90" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onmark">
         <description>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onmark.html</test_script_entry>
         </description>
       </testcase> -->
-      <testcase purpose="Check if SpeechSynthesisUtterance::onpause eventHandler can be fired properly" onload_delay="90" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onpause">
-        <description>
-          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onpause.html</test_script_entry>
-        </description>
-      </testcase>
-      <testcase purpose="Check if SpeechSynthesisUtterance::onresume eventHandler can be fired properly" onload_delay="90" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onresume">
-        <description>
-          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onresume.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if SpeechSynthesisUtterance::onstart eventHandler can be fired properly" onload_delay="90" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onstart">
         <description>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onstart.html</test_script_entry>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_onvoiceschanged_attibute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if SpeechSynthesis::pause() method works properly" onload_delay="5" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesis_pause">
-        <description>
-          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pause.html</test_script_entry>
-        </description>
-      </testcase>
+
       <testcase purpose="Check if SpeechSynthesis::pause() method exists" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesis_pause_exist">
         <description>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pause_exist.html</test_script_entry>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_pending_attibute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check if SpeechSynthesis::resume() method works properly" onload_delay="5" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesis_resume">
-        <description>
-          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_resume.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if SpeechSynthesis::resume() method exists" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesis_resume_exist">
         <description>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_resume_exist.html</test_script_entry>
           <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesis_speaking_attibute.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Test whether SpeechSynthesisUtterance::onerror is called with argument of proper type" component="W3C_HTML5 APIs/TBD/Speech" execution_type="auto" id="SpeechSynthesisUtterance_onerror">
+        <description>
+          <test_script_entry>/opt/tct-speech-w3c-tests/speech/SpeechSynthesisUtterance_onerror.html</test_script_entry>
+        </description>
+      </testcase>
     </set>
   </suite>
 </test_definition>