[common][voicecontrol][Add sleep for waiting engine finalization] 09/282109/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Tue, 27 Sep 2022 05:34:58 +0000 (14:34 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 27 Sep 2022 05:34:58 +0000 (14:34 +0900)
Change-Id: I2c5ea0744994ee9d4fc6dc30dfbfb026a7250d18
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
common/tct-voicecontrol-tizen-tests/voicecontrol/VoiceControlClient_release_extra_argument.html

index 0da2eb5bc1e1fbd10aebe953f088a7ac3d6e5526..8810422ed7e1de680910671f1b49946168cb43c7 100755 (executable)
@@ -35,6 +35,16 @@ Authors:
 <div id="log"></div>
 <script type="text/javascript">
 
+function sleep(numberMillis) {
+    var now = new Date();
+    var exitTime = now.getTime() + numberMillis;
+    while (true) {
+        now = new Date();
+        if (now.getTime() > exitTime)
+        return;
+    }
+}
+
 //==== TEST: {document.title}
 //==== LABEL Check if method release accepts extra argument
 //==== SPEC Tizen Web API:UIX:VoiceControl:VoiceControlClient:release M
@@ -47,6 +57,7 @@ test(function () {
     temp.test_function = function (argument) {
         var vcc = tizen.voicecontrol.getVoiceControlClient();
         vcc.release(argument);
+        sleep(1000);
     }
 
     checkExtraArgument(temp, "test_function");