}
});
- var date, alarm, alarm1,notificationDict, notification, retVal;
+ var date, alarm, noti, notificationDict, notification, retVal, key;
date = new Date();
date.setHours(date.getHours() + 1);
alarm = new tizen.AlarmAbsolute(date);
};
notification = new tizen.StatusNotification("SIMPLE", "Simple notification", notificationDict);
retVal = tizen.alarm.addAlarmNotification(alarm, notification);
- alarm1 = tizen.alarm.getAlarmNotification(alarm.id);
+ noti = tizen.alarm.getAlarmNotification(alarm.id);
assert_type(retVal, "undefined", "method returned value");
- assert_equals(alarm.id, alarm1.id, "the object is not the same which was added");
+ for (key in notification) {
+ if (notification[key] instanceof Array) {
+ assert_equals(JSON.stringify(noti[key]), JSON.stringify(notification[key]), "arrays are not same");
+ } else {
+ assert_equals(noti[key], notification[key], "properties are not same");
+ }
+ }
}, document.title);
</script>