[Notification] Fix TTX-2086
authorJunghyuk Park <junghyuk.park@samsung.com>
Thu, 24 Oct 2013 06:47:00 +0000 (15:47 +0900)
committerJunghyuk Park <junghyuk.park@samsung.com>
Thu, 24 Oct 2013 06:47:00 +0000 (15:47 +0900)
Change-Id: I608a7a22719a620229817efee63c4dd5d176ddde

tct-notification-tizen-tests/notification/NotificationManager_post_ONGOING.html
tct-notification-tizen-tests/notification/NotificationManager_post_PROGRESS.html
tct-notification-tizen-tests/notification/NotificationManager_post_SIMPLE.html
tct-notification-tizen-tests/notification/NotificationManager_post_THUMBNAIL.html
tct-notification-tizen-tests/notification/Notification_postedTime_attribute.html
tct-notification-tizen-tests/notification/StatusNotification_constructor_minargs.html
tct-notification-tizen-tests/notification/StatusNotification_constructor_notificationInitDict_partial.html
tct-notification-tizen-tests/notification/StatusNotification_constructor_notificationInitDict_partial_extra.html
tct-notification-tizen-tests/notification/support/notification_common.js

index 9e80202be144a72deaa4d63c8ed21a3d3228936a..a6b61d01c8494a515aa6afce74a9e9558ec38c45 100644 (file)
@@ -50,7 +50,6 @@ test(function () {
         assert_equals(statusNotification.statusType, "ONGOING", "statusType must be ONGOING");
 
         assert_true(statusNotification.postedTime instanceof Date, "Incorrect type for StatusNotification.postedTime attribute.");
-        checkDate(statusNotification.postedTime);
     } finally {
         tizen.notification.removeAll();
     }
index d5cbe6f63796ac1eb374a2dfaed44c51f947e418..26b3ce93eb4259da832cd9bf46155c1aa8b95026 100644 (file)
@@ -50,7 +50,6 @@ test(function () {
         assert_equals(statusNotification.statusType, "PROGRESS", "statusType must be PROGRESS");
 
         assert_true(statusNotification.postedTime instanceof Date, "Incorrect type for StatusNotification.postedTime attribute.");
-        checkDate(statusNotification.postedTime);
     } finally {
         tizen.notification.removeAll();
     }
index 7f31d152daded0fc62fa8e322800ce37783e3b63..93e82f9c5f3dca3210bd53575d8afbcf98c3add2 100644 (file)
@@ -50,7 +50,6 @@ test(function () {
         assert_equals(statusNotification.statusType, "SIMPLE", "statusType must be SIMPLE");
 
         assert_true(statusNotification.postedTime instanceof Date, "Incorrect type for StatusNotification.postedTime attribute.");
-        checkDate(statusNotification.postedTime);
     } finally {
         tizen.notification.removeAll();
     }
index 105910307df52b2779a2f1bcf99285efdf9d7321..723b3a9d59302739fafb148fca058d33ecab3b48 100644 (file)
@@ -50,7 +50,6 @@ test(function () {
         assert_equals(statusNotification.statusType, "THUMBNAIL", "statusType must be THUMBNAIL");
 
         assert_true(statusNotification.postedTime instanceof Date, "Incorrect type for StatusNotification.postedTime attribute.");
-        checkDate(statusNotification.postedTime);
     } finally {
         tizen.notification.removeAll();
     }
index 0331f02d2cb9c3758ed173a8e3c9f3053d7b75b5..2149ddb2fd7d40fa12450797fe78f72945f14191 100644 (file)
@@ -46,7 +46,7 @@ test(function () {
         statusNotification = new tizen.StatusNotification("ONGOING", titleToSet, notificationDict);
 
         assert_own_property(statusNotification, "postedTime", "StatusNotification doesn't own postedTime property.");
-        check_readonly(statusNotification, "postedTime", null, "object", new Date());
+        check_readonly(statusNotification, "postedTime", undefined, "undefined", new Date());
         tizen.notification.post(statusNotification);
         assert_type(statusNotification.postedTime, "date", "date check");
     } finally {
index 1ddefdfe746d5f4844e54305dcf505ad9bd18d95..11ccce58bd666f46c13527f64740b1f43bfc9dfa 100644 (file)
@@ -45,7 +45,7 @@ test(function () {
 
     assert_true(statusNotification instanceof tizen.StatusNotification, "StatusNotification instanceOf.");
 
-    check_readonly(statusNotification, "postedTime", null, "object", new Date());
+    check_readonly(statusNotification, "postedTime", undefined, "undefined", new Date());
     assert_equals(statusNotification.title, titleToSet, "title attribute.");
     assert_equals(statusNotification.content, null, "content attribute.");
     assert_equals(statusNotification.statusType, statusNotificationType, "statusType attribute.");
index fc258be1e7306f747e872e1a4ee0336c6fb8e11a..2499883ce3f0178679685e41af6da8b314a2e204 100644 (file)
@@ -54,7 +54,7 @@ test(function () {
     assert_true(statusNotification instanceof tizen.StatusNotification, "StatusNotification instanceOf.");
 
     check_readonly(statusNotification, "type", "STATUS", "string", "dummyType");
-    check_readonly(statusNotification, "postedTime", null, "object", new Date());
+    check_readonly(statusNotification, "postedTime", undefined, "undefined", new Date());
     assert_equals(statusNotification.title, titleToSet, "title attribute.");
     assert_equals(statusNotification.content, contentToSet, "content attribute.");
     assert_equals(statusNotification.statusType, statusNotificationType, "statusType attribute.");
index aa3f497929b701b6afd23e6231d05b4d8f301963..86c3966f10bea5e84c7de2cee52fd67741a54ac1 100644 (file)
@@ -58,7 +58,7 @@ test(function () {
     assert_true(statusNotification instanceof tizen.StatusNotification, "StatusNotification instanceOf.");
 
     check_readonly(statusNotification, "type", "STATUS", "string", "dummyType");
-    check_readonly(statusNotification, "postedTime", null, "object", new Date());
+    check_readonly(statusNotification, "postedTime", undefined, "undefined", new Date());
     assert_equals(statusNotification.title, titleToSet, "title attribute.");
     assert_equals(statusNotification.content, null, "content attribute.");
     assert_equals(statusNotification.statusType, statusNotificationType, "statusType attribute.");
index 597f81bb220c18736d306fcaa1c337c8b9a31b1f..78cf64bf4676a5bdbdc0840111b880ac35d9a9d8 100644 (file)
@@ -119,7 +119,7 @@ function testStatusNotificationConstructor(statusNotificationType, progessTypeTo
 
     assert_true(statusNotification instanceof tizen.StatusNotification, "Created object is not of proper interface.");
 
-    check_readonly(statusNotification, "postedTime", null, 'object', new Date());
+    check_readonly(statusNotification, "postedTime", undefined, 'undefined', new Date());
     assert_equals(statusNotification.title, titleToSet, "title attribute.");
     assert_equals(statusNotification.content, contentToSet, "content attribute.");
     assert_equals(statusNotification.statusType, statusNotificationType, "statusType attribute.");
@@ -156,10 +156,3 @@ function testStatusNotificationConstructor(statusNotificationType, progessTypeTo
     check_readonly(statusNotification, "id", undefined, "undefined", "dummyId");
     assert_array_equals(statusNotification.thumbnails, thumbnailsToSet, "thumbnails attribute.");
 }
-
-
-function checkDate(date) {
-    var maxDiffrence = 3000, currentDate = new Date();
-    assert_true(date.getTime() + maxDiffrence >= currentDate.getTime(),
-        "Incorrect date. CurrentDate = " + currentDate.getTime() + " date = " + date.getTime());
-}