[common][alarm][change past time to current time and delay to check API] 00/194600/1
authorwei zhang <wei625.zhang@samsung.com>
Thu, 6 Dec 2018 14:08:40 +0000 (22:08 +0800)
committerwei zhang <wei625.zhang@samsung.com>
Thu, 6 Dec 2018 14:08:40 +0000 (22:08 +0800)
Change-Id: If4fdad61ff3f0aa7d4a21d9b305fa7de6efc32ff

common/tct-alarm-tizen-tests/alarm/AlarmAbsolute_getNextScheduledDate_return_null.html
common/tct-alarm-tizen-tests/alarm/support/alarm_common.js
common/tct-alarm-tizen-tests/tests.xml

index 49737aaf083ecf020cbd29a43744f5cb28801b9a..af318cfc21c737662f8aa60a0ba5e7d8ba2d6b7a 100755 (executable)
@@ -55,9 +55,9 @@ test(function () {
     });
 
     var alarm, nextScheduledDate, myDate = new Date();
-    myDate.setFullYear(myDate.getFullYear() - 1);
     alarm = new tizen.AlarmAbsolute(myDate);
     tizen.alarm.add(alarm, APPLICATION_ID);
+    sleep(60000);
     nextScheduledDate = alarm.getNextScheduledDate();
     assert_equals(nextScheduledDate, null, "nextScheduledDate do not returns null");
 }, document.title);
index 7f5202624b7e6e74690c832c017fb0cbc3bde06f..de282c614f3820df2c1a294e5ca019186ea2dc6a 100755 (executable)
@@ -56,3 +56,13 @@ function createRelAlarm() {
 function cleanAlarms() {
     tizen.alarm.removeAll();
 }
+
+function sleep(numberMillis) {
+    var now = new Date();
+    var exitTime = now.getTime() + numberMillis;
+    while (true) {
+        now = new Date();
+        if (now.getTime() > exitTime)
+        return;
+    }
+}
\ No newline at end of file
index 7c420cc58236ee72404234d7dd983da21f4860f4..8989d1f26554c51cedb2cae339168629078a3a86 100755 (executable)
@@ -53,7 +53,7 @@
           <test_script_entry>/opt/tct-alarm-tizen-tests/alarm/AlarmAbsolute_getNextScheduledDate_extra_argument.html</test_script_entry>
         </description>
       </testcase>
-      <testcase component="TizenAPI/Application/Alarm" execution_type="auto" id="AlarmAbsolute_getNextScheduledDate_return_null" priority="P1" purpose="Check using getNextScheduledDate method for null return">
+      <testcase component="TizenAPI/Application/Alarm" execution_type="auto" id="AlarmAbsolute_getNextScheduledDate_return_null" onload_delay="90" priority="P1" purpose="Check using getNextScheduledDate method for null return">
         <description>
           <test_script_entry>/opt/tct-alarm-tizen-tests/alarm/AlarmAbsolute_getNextScheduledDate_return_null.html</test_script_entry>
         </description>