[Calendar] various fixes
authorAndrzej Krolikowski <a.krolikowsk@samsung.com>
Fri, 11 Oct 2013 13:19:26 +0000 (15:19 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 11 Oct 2013 13:37:27 +0000 (13:37 +0000)
Mainly related to indentation.

Change-Id: Ie29f3385b533aaeb3dc6880dc972f78371a2c442

38 files changed:
tct-calendar-tizen-tests/calendar/CalendarChangeCallback_onitemsremoved.html [changed mode: 0755->0644]
tct-calendar-tizen-tests/calendar/CalendarChangeCallback_onitemsupdated.html [changed mode: 0755->0644]
tct-calendar-tizen-tests/calendar/CalendarItem_attribute_valid_value_CalendarEvent.html
tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_successCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_successCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/CalendarManager_getUnifiedCalendar_missarg.html
tct-calendar-tizen-tests/calendar/CalendarTask_attribute_date_valid_value.html
tct-calendar-tizen-tests/calendar/Calendar_CalendarItem_set_isAllDay_duration_organizer.html
tct-calendar-tizen-tests/calendar/Calendar_CalendarItem_set_summary_geolocation_priority.html
tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getCalendars_successcallback_invalid.html
tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_CalendarType_error.html
tct-calendar-tizen-tests/calendar/Calendar_CalendarManager_getDefaultCalendar_null.html
tct-calendar-tizen-tests/calendar/Calendar_find_errorCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_find_errorCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/Calendar_find_filter_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_find_sortMode_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_find_sortMode_invalid_obj.html
tct-calendar-tizen-tests/calendar/Calendar_find_successCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_find_successCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/Calendar_remove.html
tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/Calendar_removeBatch_ids_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_removeBatch_successCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_removeBatch_successCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_errorCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_errorCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_items_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_successCallback_TypeMismatch.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_successCallback_invalid_cb.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_with_successCallback.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch_with_updateAllInstances.html
tct-calendar-tizen-tests/calendar/Calendar_update_item_TypeMismatch.html
tct-calendar-tizen-tests/tests.full.xml
tct-calendar-tizen-tests/tests.xml

old mode 100755 (executable)
new mode 100644 (file)
index 8550581..3ee10a6
@@ -35,7 +35,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA CBOA CBT
 var t = async_test(document.title, {timeout: 90000}),
-    watcher, event_init, calendar, ev;
+    watcher, eventInit, calendar, ev;
 setup({timeout: 90000});
 
 t.step(function () {
@@ -61,7 +61,7 @@ t.step(function () {
 
     calendar.addChangeListener(watcher);
 
-    event_init = {
+    eventInit = {
         description: "HTML5 Introduction",
         summary: "HTML5 Webinar ",
         startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
@@ -69,7 +69,7 @@ t.step(function () {
         location: "Huesca"
     };
 
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     calendar.add(ev);
 });
 
old mode 100755 (executable)
new mode 100644 (file)
index b5a1b33..b0fb5a3
@@ -35,15 +35,15 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA CBOA CBT
 var t = async_test(document.title, {timeout: 90000}),
-    watcher, event_init, calendar, ev, ev_get;
+    watcher, eventInit, calendar, ev, evGet;
 setup({timeout: 90000});
 
 t.step(function () {
     watcher = {
         onitemsadded: t.step_func(function (items) {
-            ev_get = calendar.get(ev.id);
-            ev_get.summary = "updated summary";
-            calendar.update(ev_get);
+            evGet = calendar.get(ev.id);
+            evGet.summary = "updated summary";
+            calendar.update(evGet);
         }),
         onitemsupdated: t.step_func(function (items) {
 
@@ -82,7 +82,7 @@ t.step(function () {
 
     calendar.addChangeListener(watcher);
 
-    event_init = {
+    eventInit = {
         description: "HTML5 Introduction",
         summary: "HTML5 Webinar ",
         startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
@@ -90,7 +90,7 @@ t.step(function () {
         location: "Huesca"
     };
 
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     calendar.add(ev);
 });
 
index fdc10e0271f1252ce6d0bd6329723e757f7fb575..7c2e7ab5fc0b79598bf7b68a219297fd7a530292 100644 (file)
@@ -42,7 +42,7 @@ Authors:
 test(function () {
     var retrievedEvent, originalEvent,
         eventCalendar = tizen.calendar.getDefaultCalendar("EVENT");
-        originalEvent = new tizen.CalendarEvent({
+    originalEvent = new tizen.CalendarEvent({
         description: "Tizen description",
         summary: "Tizen summary",
         isAllDay: false,
index c2ca65b505f51e353b3c92dc211570fe23e4cebc..6624811e87265ce1446428f67d27fc60cf385680 100644 (file)
@@ -41,16 +41,17 @@ t.step(function () {
     successCallback = t.step_func(function (calendars) {
         assert_unreached("TypeMismatchError should be thrown");
     });
+
     conversionTable = getTypeConversionExceptions("functionObject", true);
     for (i = 0; i < conversionTable.length; i++) {
         errorCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar = tizen.calendar.getCalendars("EVENT", successCallback, errorCallback);
-        }, exceptionName + " should be thrown - given incorrect items.");
+        assert_throws({name: exceptionName}, function () {
+            calendar = tizen.calendar.getCalendars("EVENT", successCallback, errorCallback);
+        }, exceptionName + " should be thrown - given incorrect errorCallback");
     }
+
     t.done();
 });
 
index a639e3f25ca9708cfce98f3f476a56a818d5e19d..bbd571c839f3af97844c797bc71ece5607e72ecf 100644 (file)
@@ -30,27 +30,28 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: CalendarManager_getCalendars_errorCallback_invalid_cb
-//==== LABEL Test if putting a user errorCallback object in getCalendars method which was not created through the constructor but has all the properties failes.
+//==== LABEL Check if CalendarManager.getCalendars method throws exception when errorCallback is invalid
 //==== PRIORITY: P2
 //==== SPEC Tizen Web API:Social:Calendar:CalendarManager:getCalendars M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
 var t = async_test(document.title),
-    calendar, exceptionName, successCallback, errorCallback, exceptionName = "TypeMismatchError";
+    calendar, successCallback, errorCallback;
 t.step(function () {
     successCallback = t.step_func(function (calendars) {
         assert_unreached("Invalid callback invoked");
     });
+
     errorCallback = {
         onerror: t.step_func(function () {
             assert_unreached("Invalid callback invoked");
         })
     };
 
-    assert_throws({name: exceptionName},
-        function () {
-            calendar = tizen.calendar.getCalendars("EVENT", successCallback, errorCallback);
-    }, exceptionName + " should be thrown - given incorrect items.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar = tizen.calendar.getCalendars("EVENT", successCallback, errorCallback);
+    }, "Given incorrect errorCallback");
+
     t.done();
 });
 
index 4baac06ddd412e7d9323c3106b3b02a61d6c5146..d14a8cc2989e0353d477ae567aa28b29cd87d1f6 100644 (file)
@@ -43,11 +43,11 @@ t.step(function () {
         successCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar = tizen.calendar.getCalendars("EVENT", successCallback);
+        assert_throws({name: exceptionName}, function () {
+            calendar = tizen.calendar.getCalendars("EVENT", successCallback);
         }, exceptionName + " should be thrown - given incorrect success callback.");
     }
+
     t.done();
 });
 
index b82fd1fb7d45e6250a66ed19fe19b2ad2120baed..0c81fcd31cd17305f8c2d7213e1f15ae3f9c0490 100644 (file)
@@ -30,23 +30,22 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: CalendarManager_getCalendars_successCallback_invalid_cb
-//==== LABEL Test if putting a user successCallback object in getCalendars method which was not created through the constructor but has all the properties failes.
+//==== LABEL Check if CalendarManager.getCalendars method throws exception when successCallback is invalid
 //==== PRIORITY: P2
 //==== SPEC Tizen Web API:Social:Calendar:CalendarManager:getCalendars M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
-var t = async_test(document.title),
-    calendar, exceptionName, successCallback, exceptionName = "TypeMismatchError";
+var t = async_test(document.title), calendar, successCallback;
 t.step(function () {
     successCallback = {
         onsuccess: t.step_func(function () {
             assert_unreached("Invalid callback invoked");
         })
     };
-    assert_throws({name: exceptionName},
-        function () {
-            calendar = tizen.calendar.getCalendars("EVENT", successCallback);
-    }, exceptionName + " should be thrown - given incorrect items.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar = tizen.calendar.getCalendars("EVENT", successCallback);
+    }, "Given incorrect successCallback");
+
     t.done();
 });
 
index e1da42055866e5b522e4f7d5d4f8c18243de4b32..5d9d4dd16d065d6a60965e562359b73ee7345d11 100644 (file)
@@ -36,9 +36,8 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MMA
 test(function () {
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            tizen.calendar.getUnifiedCalendar();
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        tizen.calendar.getUnifiedCalendar();
     });
 }, document.title);
 
index db5ccf395c4522128c3a2cd1373de116a4947f34..43064cfae210ca85e1a1a70f0c1f3efbdafd33a0 100644 (file)
@@ -32,8 +32,6 @@ Authors:
 <body>
 <div id="log"></div>
 <script type="text/javascript">
-
-
 //==== TEST: CalendarTask_attribute_date_valid_value
 //==== LABEL Check various date attributes of CalendarTask
 //==== SPEC Tizen Web API:Social:Calendar:CalendarItem:startDate A
@@ -42,12 +40,13 @@ Authors:
 test(function () {
     var retrievedTask, originalTask,
         taskCalendar  = tizen.calendar.getDefaultCalendar("TASK");
-        originalTask = new tizen.CalendarTask({
-            startDate: new tizen.TZDate(2012, 2, 20, 10, 0),
-            dueDate: new tizen.TZDate(2012, 2, 25, 10, 0),
-            completedDate: new tizen.TZDate(2012, 2, 24, 10, 0),
-            progress: 100
-            });
+
+    originalTask = new tizen.CalendarTask({
+        startDate: new tizen.TZDate(2012, 2, 20, 10, 0),
+        dueDate: new tizen.TZDate(2012, 2, 25, 10, 0),
+        completedDate: new tizen.TZDate(2012, 2, 24, 10, 0),
+        progress: 100
+    });
 
     taskCalendar.add(originalTask);
     retrievedTask = taskCalendar.get(originalTask.id);
index 06bf1f97ed31069d7d5911f9deb90d0a57614938..c9593aa5f5df1328d6fc6903e288e01dcee8caa6 100644 (file)
@@ -46,21 +46,20 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA
 
- var description = "set attri value: isAllDay & duration & organizer.";
- test(function () {
-     var event_init = {description:"HTML5 Introduction",
-                       summary:"HTML5 Webinar ",
-                       startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                       duration: new tizen.TimeDuration(1, "HOURS"),
-                       location:"Huesca"},
-     ev = new tizen.CalendarEvent(event_init);
+test(function () {
+    var event_init = {description:"HTML5 Introduction",
+                      summary:"HTML5 Webinar ",
+                      startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+                      duration: new tizen.TimeDuration(1, "HOURS"),
+                      location:"Huesca"},
+    ev = new tizen.CalendarEvent(event_init);
 
-     ev.isAllDay = false;
-     ev.duration = new tizen.TimeDuration(1, "HOURS"),
-     ev.organizer = "Mr. Jones";
-     assert_equals(ev.isAllDay, false);
-     assert_not_equals(ev.duration, null);
-     assert_equals(ev.organizer, "Mr. Jones");
+    ev.isAllDay = false;
+    ev.duration = new tizen.TimeDuration(1, "HOURS"),
+    ev.organizer = "Mr. Jones";
+    assert_equals(ev.isAllDay, false, "Incorrect isAllDay");
+    assert_not_equals(ev.duration, null, "Incorrect duration");
+    assert_equals(ev.organizer, "Mr. Jones", "Incorrect organizer");
 }, document.title);
 
 </script>
index 9329ac1a549aea4de09e8476ef4013721893b6c7..38759f2f45f7ed408b12d56362173d2260cb1d77 100644 (file)
@@ -46,21 +46,20 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA
 
- var description = "set attri value: summary & geolocation& priority.";
- test(function () {
-     var event_init = {description:"HTML5 Introduction",
-                       summary:"HTML5 Webinar ",
-                       startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
-                       duration: new tizen.TimeDuration(1, "HOURS"),
-                       location:"Huesca"},
-     ev = new tizen.CalendarEvent(event_init);
+test(function () {
+    var event_init = {description:"HTML5 Introduction",
+                      summary:"HTML5 Webinar ",
+                      startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
+                      duration: new tizen.TimeDuration(1, "HOURS"),
+                      location:"Huesca"},
+    ev = new tizen.CalendarEvent(event_init);
 
-     ev.summary = "check if set attribute value successful after create ev";
-     ev.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
-     ev.priority = "HIGH";
-     assert_equals(ev.summary, "check if set attribute value successful after create ev");
-     assert_not_equals(ev.geolocation, null);
-     assert_equals(ev.priority, "HIGH");
+    ev.summary = "check if set attribute value successful after create ev";
+    ev.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
+    ev.priority = "HIGH";
+    assert_equals(ev.summary, "check if set attribute value successful after create ev", "Incorrect summary");
+    assert_not_equals(ev.geolocation, null, "Incorrect geolocation");
+    assert_equals(ev.priority, "HIGH", "Incorrect priority");
 }, document.title);
 
 </script>
index 4cf02a3f4809a47d04a56f7aaa137e17ded8bf9f..020622983491d7e193fa649b9fc097eccb2f69cb 100644 (file)
@@ -47,9 +47,9 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function (){
-   assert_throws(TYPE_MISMATCH_EXCEPTION, function (){
-       tizen.calendar.getCalendars("EVENT", false);
-   }, "TypeMismatchError exception.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function (){
+        tizen.calendar.getCalendars("EVENT", false);
+    }, "TypeMismatchError exception.");
 }, document.title);
 
 </script>
index 60b121f5074b79d5890c2d9f2df571d9a9cfbbb1..73fbe171b66eebd39c58562ff22eaec36ddd09b7 100644 (file)
@@ -32,10 +32,6 @@ Authors:
 <html>
 <head>
 <title>Calendar_CalendarManager_getDefaultCalendar_CalendarType_error</title>
-    <link rel="author" title="Intel" href="http://www.intel.com/"/>
-    <link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html" />
-<meta name="assert" content="Check that throw an exception"/>
-<meta name="flags" content="" />
 <script type="text/javascript" src="support/unitcommon.js"></script>
 </head>
 <body>
@@ -49,9 +45,9 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function (){
-   assert_throws(TYPE_MISMATCH_EXCEPTION, function (){
-       tizen.calendar.getDefaultCalendar("123");
-   }, "TypeMismatchError exception.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function (){
+        tizen.calendar.getDefaultCalendar("123");
+    }, "TypeMismatchError exception.");
 }, document.title);
 
 </script>
index 8515fbc60fd9d3674b3390f8621b1b9d12de0fe5..8ce64e59b1bc7fd7bd34d2d2fd8a95209d88625b 100644 (file)
@@ -32,10 +32,6 @@ Authors:
 <html>
 <head>
 <title>Calendar_CalendarManager_getDefaultCalendar_null</title>
-    <link rel="author" title="Intel" href="http://www.intel.com/"/>
-    <link rel="help" href="https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html" />
-<meta name="assert" content="Check that throw an exception"/>
-<meta name="flags" content="" />
 <script type="text/javascript" src="support/unitcommon.js"></script>
 <script src="support/calendar_common.js"></script>
 </head>
@@ -50,9 +46,9 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function (){
-   assert_throws(TYPE_MISMATCH_EXCEPTION, function (){
-       tizen.calendar.getDefaultCalendar(null);
-   }, "TypeMismatchError exception.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function (){
+        tizen.calendar.getDefaultCalendar(null);
+    }, "TypeMismatchError exception.");
 }, document.title);
 
 </script>
index 164603cbfc88d001851d9a0f89432daa2a15dbc1..b803087a0ef409efb9039d9afd8d8e695e755ba3 100644 (file)
@@ -36,21 +36,22 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
 var t = async_test(document.title), successCallback,
-    calendar, conversionTable, exceptionName = "TypeMismatchError", i, errorCallback;
+    calendar, conversionTable, exceptionName, i, errorCallback;
 t.step(function () {
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
     successCallback = t.step_func(function () {
     });
+
     conversionTable = getTypeConversionExceptions("functionObject", true);
     for (i = 0; i < conversionTable.length; i++) {
         errorCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.find(successCallback, errorCallback);
-        }, exceptionName + " should be thrown - given incorrect successCallback.");
+        assert_throws({name: exceptionName}, function () {
+            calendar.find(successCallback, errorCallback);
+        }, exceptionName + " should be thrown - given incorrect errorCallback.");
     }
+
     t.done();
 });
 
index 42e75a1260e9ec5b86a70e36a95710c7a40340b1..d46ee6c1b0e2e6f5c45ca6e3bf1e2da05ebd7b78 100644 (file)
@@ -36,15 +36,15 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
 var t = async_test(document.title), eventSearchSuccessCallback,
-    errorCallback, ev1, event1, calendar, filter,
-    exceptionName = "TypeMismatchError";
+    errorCallback, ev1, event1, calendar, filter;
 t.step(function (){
     eventSearchSuccessCallback = t.step_func(function (events) {
-        assert_unreached("Invalid callback invoked: ");
+        assert_unreached("Success callback invoked");
     });
+
     errorCallback = {
         onerror: t.step_func(function (items) {
-            assert_unreached("Invalid callback invoked: ");
+            assert_unreached("Invalid error callback invoked");
         })
     };
     event1 = {description: "HTML5 Introduction",
@@ -56,10 +56,10 @@ t.step(function (){
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
     calendar.add(ev1);
     filter = {attributeName: "summary", matchFlag: "CONTAINS", matchValue: "Tizen"};
-    assert_throws({name: exceptionName},
-        function () {
-            calendar.find(eventSearchSuccessCallback, errorCallback);
-    }, exceptionName + " should be thrown - given incorrect sortMode.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar.find(eventSearchSuccessCallback, errorCallback);
+    }, "Given incorrect errorCallback.");
+
     cleanup(calendar);
     t.done();
 });
index 97ae54c4cce39c7d61d2ae6945249a1b93351738..be2b78f8af451e8c02c374893725c370e06f9b95 100644 (file)
@@ -35,32 +35,34 @@ Authors:
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:find M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
-var t = async_test(document.title), successCallback, event_init,
-    calendar, ev, conversionTable, exceptionName = "TypeMismatchError", i, errorCallback,
+var t = async_test(document.title), successCallback, eventInit,
+    calendar, ev, conversionTable, exceptionName, i, errorCallback,
     filter;
 t.step(function () {
-    event_init = {description:"HTML5 Introduction",
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     calendar.add(ev);
     successCallback = t.step_func(function () {
     });
+
     errorCallback = t.step_func(function () {
     });
+
     conversionTable = getTypeConversionExceptions("object", true);
     for (i = 0; i < conversionTable.length; i++) {
         filter = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.find(successCallback, errorCallback, filter);
+        assert_throws({name: exceptionName}, function () {
+            calendar.find(successCallback, errorCallback, filter);
         }, exceptionName + " should be thrown - given incorrect filter. " + format_value(filter));
     }
+
     cleanup(calendar);
     t.done();
 });
index a60366cc1c265da0ab52abe6ba0f3bd5cb66ef13..ba08bbf38acd3ba3815db0a314b927ebbbda504e 100644 (file)
@@ -35,33 +35,36 @@ Authors:
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:find M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
-var t = async_test(document.title), successCallback, event_init,
+var t = async_test(document.title), successCallback, eventInit,
     calendar, ev, conversionTable, exceptionName = "TypeMismatchError", i, errorCallback,
     filter, sortMode;
 t.step(function () {
-    event_init = {description:"HTML5 Introduction",
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     calendar.add(ev);
+
     successCallback = t.step_func(function () {
     });
+
     errorCallback = t.step_func(function () {
     });
+
     filter = new tizen.AttributeFilter("summary", "CONTAINS", "Webinar");
     conversionTable = getTypeConversionExceptions("object", true);
     for (i = 0; i < conversionTable.length; i++) {
         sortMode = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.find(successCallback, errorCallback, filter, sortMode);
+        assert_throws({name: exceptionName}, function () {
+            calendar.find(successCallback, errorCallback, filter, sortMode);
         }, exceptionName + " should be thrown - given incorrect sortMode. " + format_value(sortMode));
     }
+
     cleanup(calendar);
     t.done();
 });
index 145f937299c5a538680376ec11e367a871f6a7ba..2360018d73c636a047d8568405f391fd101084ec 100644 (file)
@@ -62,11 +62,10 @@ t.step(function (){
     calendar.add(ev1);
     calendar.add(ev2);
     filter = new tizen.AttributeFilter("summary", "CONTAINS", "Tizen");
-    assert_throws({name: exceptionName},
-        function () {
-            calendar.find(eventSearchSuccessCallback, errorCallback,
-                filter, sortMode);
+    assert_throws({name: exceptionName}, function () {
+        calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortMode);
     }, exceptionName + " should be thrown - given incorrect sortMode.");
+
     cleanup(calendar);
     t.done();
 });
index 03fbfdbfeae077b67d236473ce7d08c969543003..cdee5a35130f5fffcdf20889d0a527383d14ba69 100644 (file)
@@ -36,7 +36,7 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
 var t = async_test(document.title), successCallback,
-    calendar, conversionTable, exceptionName = "TypeMismatchError", i;
+    calendar, conversionTable, exceptionName, i;
 t.step(function () {
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
     conversionTable = getTypeConversionExceptions("functionObject", false);
@@ -44,11 +44,11 @@ t.step(function () {
         successCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.find(successCallback);
+        assert_throws({name: exceptionName}, function () {
+            calendar.find(successCallback);
         }, exceptionName + " should be thrown - given incorrect successCallback.");
     }
+
     t.done();
 });
 
index f623f08931797b0642d66dd4d2cc8ac5790b6c66..871eed3b5c4cdec76d3f9cd17b97006c3936efe9 100644 (file)
@@ -35,19 +35,19 @@ Authors:
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:find M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
-var t = async_test(document.title), successCallback,
-    calendar, exceptionName = "TypeMismatchError";
+var t = async_test(document.title), successCallback, calendar;
 t.step(function () {
     successCallback = {
         onsuccess: t.step_func(function (items) {
-            assert_unreached("Invalid callback invoked: ");
+            assert_unreached("Invalid success callback invoked");
         })
     };
+
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    assert_throws({name: exceptionName},
-        function () {
-            calendar.find(successCallback);
-    }, exceptionName + " should be thrown - given incorrect successCallback.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar.find(successCallback);
+    }, "Given incorrect successCallback");
+
     t.done();
 });
 
index c2ce1b32782086d1be4ab7cdf8d92f82e56c774e..18eca00f23096c761c7a301ce38b17423ea7da14 100644 (file)
@@ -43,12 +43,13 @@ var t = async_test(document.title, {timeout: 5000}), task, taskCalendar,
 
 t.step(function () {
 
-
     taskSearchSuccessCallback = t.step_func(function (events) {
-    assert_equals(returnedValue, undefined, "Incorect returned value from remove()");
+        assert_equals(returnedValue, undefined, "Incorect returned value from remove()");
         assert_equals(events.length, 0, "Task should not be found.");
+
         t.done();
     });
+
     taskSearchErrorCallback = t.step_func(function (error) {
         assert_unreached("find() error callaback invoked: " + error.name + ": " + error.message);
     });
index 457408b1959ac7bebc23617f240b4a9033135c5c..d6a25cea560195446f9e1f4e7fff0e2ccaaae58f 100644 (file)
@@ -40,28 +40,27 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
 var t = async_test(document.title), i,
-    calendar, ev1, ev_1, successCallback, conversionTable, errorCallback, exceptionName;
+    calendar, eventInit, calendarEvent, successCallback, conversionTable, errorCallback, exceptionName;
 t.step(function () {
     successCallback = t.step_func(function () {
     });
-    ev1 = {description:"HTML5 Introduction",
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev_1 = new tizen.CalendarEvent(ev1);
-    calendar.add(ev_1);
+    calendarEvent = new tizen.CalendarEvent(eventInit);
+    calendar.add(calendarEvent);
 
     conversionTable = getTypeConversionExceptions("functionObject", true);
     for (i = 0; i < conversionTable.length; i++) {
         errorCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.removeBatch([ev_1.id, 123], successCallback, errorCallback);
-        }, exceptionName + " should be thrown - given incorrect id.");
+        assert_throws({name: exceptionName}, function () {
+            calendar.removeBatch([calendarEvent.id, 123], successCallback, errorCallback);
+        }, exceptionName + " should be thrown - given incorrect ids.");
     }
     cleanup(calendar);
     t.done();
index 202721de8ccae0492e2d1ba93fb24fbc45e08569..6f4b9f162928604e02d2fced5ad3bea95cf9d7b7 100644 (file)
@@ -34,7 +34,7 @@ Authors:
 <script>
 
 //==== TEST: Calendar_removeBatch_errorCallback_invalid_cb
-//==== LABEL Test if putting a user errorCallback object in removeBatch which was not created through the constructor but has all the properties failes.
+//==== LABEL Check if Calendar.removeBatch method throws exception when errorCallback is invalid
 //==== PRIORITY: P2
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:removeBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
@@ -44,11 +44,11 @@ var t = async_test(document.title),
 t.step(function () {
     successCallback = t.step_func(function () {
     });
+
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            calendar.removeBatch([123], successCallback, {onerror:function (){}});
-    }, "TypeMismatchError should be thrown - given incorrect id.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar.removeBatch([123], successCallback, {onerror:function (){}});
+    }, "TypeMismatchError should be thrown - given incorrect ids.");
     t.done();
 });
 
index 7d1a1f478299f2fc9f99f19e5eff9a093734ea8b..b95318efa0cb14a7438be3587f1362d812d2c568 100644 (file)
@@ -39,19 +39,18 @@ Authors:
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:removeBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
-var t = async_test(document.title), i, id, exceptionName,
+var t = async_test(document.title), i, ids, exceptionName,
     calendar, conversionTable;
 t.step(function () {
     conversionTable = getTypeConversionExceptions("array", false);
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
     for (i = 0; i < conversionTable.length; i++) {
-        id = conversionTable[i][0];
+        ids = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.removeBatch(id);
-        }, exceptionName + " should be thrown - given incorrect id.");
+        assert_throws({name: exceptionName}, function () {
+            calendar.removeBatch(ids);
+        }, exceptionName + " should be thrown - given incorrect ids.");
     }
     t.done();
 });
index 61f520a491fd6a894b07b6f6ede8179a112990df..cc11da6d50fa082554dfc8e09eddddbe78139c96 100644 (file)
@@ -40,36 +40,36 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MC
 var t = async_test(document.title), i,
-    calendar, ev1, ev2, ev_1, ev_2, successCallback, conversionTable, exceptionName;
+    calendar, eventInit1, eventInit2, calendarEvent1, calendarEvent2, successCallback, conversionTable, exceptionName;
 t.step(function () {
     successCallback = t.step_func(function () {
     });
-    ev1 = {description:"HTML5 Introduction",
+    eventInit1 = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
-    ev2 = {description:"HTML5 Introduction",
+    eventInit2 = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev_1 = new tizen.CalendarEvent(ev1);
-    calendar.add(ev_1);
-    ev_2 = new tizen.CalendarEvent(ev2);
-    calendar.add(ev_2);
+    calendarEvent1 = new tizen.CalendarEvent(eventInit1);
+    calendar.add(calendarEvent1);
+    calendarEvent2 = new tizen.CalendarEvent(eventInit2);
+    calendar.add(calendarEvent2);
 
     conversionTable = getTypeConversionExceptions("functionObject", true);
     for (i = 0; i < conversionTable.length; i++) {
         successCallback = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.removeBatch([ev_1.id, ev_2.id], successCallback);
-        }, exceptionName + " should be thrown - given incorrect id.");
+        assert_throws({name: exceptionName}, function () {
+            calendar.removeBatch([calendarEvent1.id, calendarEvent2.id], successCallback);
+        }, exceptionName + " should be thrown - given incorrect successCallback.");
     }
+
     cleanup(calendar);
     t.done();
 });
index 19ca8838f8d2b66ed229bda678a9dbdaec7d9480..25985f35bccf6135f7c729287cdbb104752a0c40 100644 (file)
@@ -35,26 +35,26 @@ Authors:
 <script>
 
 //==== TEST: Calendar_removeBatch_successCallback_invalid_cb
-//==== LABEL Test if putting a user successCallback object in removeBatch which was not created through the constructor but has all the properties failes.
+//==== LABEL Check if Calendar.removeBatch method throws exception when successCallback is invalid
 //==== PRIORITY: P2
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:removeBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
 var t = async_test(document.title),
-    calendar, ev1, ev_1;
+    calendar, eventInit, calendarEvent;
 t.step(function () {
-    ev1 = {description:"HTML5 Introduction",
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev_1 = new tizen.CalendarEvent(ev1);
-    calendar.add(ev_1);
-    assert_throws(TYPE_MISMATCH_EXCEPTION,
-        function () {
-            calendar.removeBatch([ev_1.id], {onsuccess:function (){}});
-    }, "TypeMismatchError should be thrown - given incorrect id.");
+    calendarEvent = new tizen.CalendarEvent(eventInit);
+    calendar.add(calendarEvent);
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar.removeBatch([calendarEvent.id], {onsuccess:function (){}});
+    }, "Given incorrect id.");
+
     cleanup(calendar);
     t.done();
 });
index a48a7fafc907978c3129b576d1c1060213313bdc..637396a1c68e549268fed73586c666b7cbe03ecf 100644 (file)
@@ -20,6 +20,7 @@ Authors:
         Tomasz Kusmierz <t.kusmierz@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch</title>
 <meta charset="utf-8">
index 40c98d66b34918f6aa0fe9b113741d340a77912d..11639cc5d3dd152ddb7150829cf43048b0ae5a21 100644 (file)
@@ -19,6 +19,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_errorCallback_TypeMismatch</title>
 <meta charset="utf-8">
@@ -46,10 +47,9 @@ t.step(function (){
         errorCB = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.updateBatch([], successCB, errorCB);
-        }, exceptionName + " should be thrown - given incorrect successCallback.");
+        assert_throws({name: exceptionName}, function () {
+            calendar.updateBatch([], successCB, errorCB);
+        }, exceptionName + " should be thrown - given incorrect errorCallback.");
     }
     t.done();
 });
index 283968d3d455d5c419e09f2141f35708a3a93973..52ff6b1a8c859528eaa00b3104133d03384f5be6 100644 (file)
@@ -19,6 +19,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_errorCallback_invalid_cb</title>
 <meta charset="utf-8">
@@ -35,21 +36,23 @@ Authors:
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
 var t = async_test(document.title),
-    calendar, successCB, errorCB, exceptionName = "TypeMismatchError";
+    calendar, successCB, errorCB;
 t.step(function (){
     successCB = t.step_func(function (events) {
         assert_unreached("Mismatcherror should be called");
     });
+
     errorCB = {
         onerror: t.step_func(function (e) {
             assert_unreached("Mismatcherror should be called");
         })
     };
+
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    assert_throws({name: exceptionName},
-        function () {
-            calendar.updateBatch([], successCB, errorCB);
-    }, exceptionName + " should be thrown - given incorrect error vallback.");
+    assert_throws(TYPE_MISMATCH_EXCEPTION,  function () {
+        calendar.updateBatch([], successCB, errorCB);
+    }, "Given incorrect errorCallback.");
+
     cleanup(calendar);
     t.done();
 });
index 3402012c5d5862a769ebd3461a54ef6961238f04..8e3d382143b522838d5b833bb746f1834937983e 100644 (file)
@@ -19,6 +19,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_items_TypeMismatch</title>
 <meta charset="utf-8">
@@ -43,9 +44,8 @@ t.step(function () {
         events = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.updateBatch(events);
+        assert_throws({name: exceptionName}, function () {
+            calendar.updateBatch(events);
         }, exceptionName + " should be thrown - given incorrect items.");
     }
     cleanup(calendar);
index f7bad4435757216a893fb0a69c0ec76554ce74ca..9a47852429256943893f0a1083063179a23723e7 100644 (file)
@@ -31,6 +31,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_successCallback_TypeMismatch</title>
 <meta charset="utf-8">
@@ -55,9 +56,8 @@ t.step(function (){
         successCB = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.updateBatch(events, successCB);
+        assert_throws({name: exceptionName}, function () {
+            calendar.updateBatch(events, successCB);
         }, exceptionName + " should be thrown - given incorrect successCallback.");
     }
     t.done();
index 759729649ff9420559e1c5de3c3c576c791caaf4..c29622b2e22d69416754accecd26199410ebac97 100644 (file)
@@ -31,6 +31,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_successCallback_invalid_cb</title>
 <meta charset="utf-8">
@@ -41,34 +42,32 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: Calendar_updateBatch_successCallback_invalid_cb
-//==== LABEL Test if putting a user successCallback object which was not created through the constructor but has all the properties failes in updateBatch method.
+//==== LABEL Check if Calendar.updateBatch method throws exception when successCallback is invalid
 //==== PRIORITY: P2
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:updateBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MTCB
 var t = async_test(document.title), events = [],
-    exp_location = "Shanghai", ev, event_init, calendar, successCB,
-    exceptionName = "TypeMismatchError";
+    expLocation = "Shanghai", ev, eventInit, calendar, successCB;
 t.step(function () {
     successCB = {
         onsuccess: t.step_func(function () {
             assert_unreached("Invalid callback invoked.");
         })
     };
-    event_init = {description:"HTML5 Introduction",
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     events = [ev];
     calendar.add(events[0]);
-    events[0].location = exp_location;
-    assert_throws({name: exceptionName},
-        function () {
-            calendar.updateBatch(events, successCB);
-    }, exceptionName + " should be thrown - given incorrect sortMode.");
+    events[0].location = expLocation;
+    assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+        calendar.updateBatch(events, successCB);
+    }, "Given incorrect successCallback");
     cleanup(calendar);
     t.done();
 });
index a11528620b2fa49670673524479753c400fb84d0..c6f00b79e7e3d78c166f99c59f4dd3bd939a3a2e 100644 (file)
@@ -32,6 +32,7 @@ Authors:
         Karol Surma <k.surma@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_with_successCallback</title>
 <meta charset="utf-8">
@@ -42,27 +43,28 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: Calendar_updateBatch_with_successCallback
-//==== LABEL Check whether 'updateBatch' method with successCallback works correctly updates several task items from the CalendarTask object asynchronously
+//==== LABEL Check if Calendar.updateBatch method works correctly with successCallback
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:updateBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MOA
 var t = async_test(document.title), events = [],
-    exp_location = "Shanghai", ev, event_init, calendar, successCB;
+    expLocation = "Shanghai", ev, eventInit, calendar, successCB;
 t.step(function (){
     successCB = t.step_func(function (events) {
         cleanup(calendar);
         t.done();
     });
-    event_init = {description:"HTML5 Introduction",
+
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     events = [ev];
     calendar.add(events[0]);
-    events[0].location = exp_location;
+    events[0].location = expLocation;
     calendar.updateBatch(events, successCB);
 });
 
index f0d535f1f4f1407959be64d40c2cb49f9e632d45..610c2840d359a43d8ddb7bbb14486f3689bc7fb9 100644 (file)
@@ -19,6 +19,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_updateBatch_with_updateAllInstances</title>
 <meta charset="utf-8">
@@ -29,30 +30,32 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: Calendar_updateBatch_with_updateAllInstances
-//==== LABEL Check whether 'updateBatch' method with updateAllInstances works correctly deletes several task items from the CalendarTask object asynchronously
+//==== LABEL Check if Calendar.updateBatch method works correctly
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:updateBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MOA
 var t = async_test(document.title), events = [],
-    exp_location = "Shanghai", ev, event_init, calendar, successCB, errorCB;
+    expLocation = "Shanghai", ev, eventInit, calendar, successCB, errorCB;
 t.step(function (){
     successCB = t.step_func(function (events){
         cleanup(calendar);
         t.done();
     });
-    errorCB = t.step_func(function (err){
+
+    errorCB = t.step_func(function (err) {
         assert_unreached("errorCB should be called");
     });
-    event_init = {description:"HTML5 Introduction",
+
+    eventInit = {description:"HTML5 Introduction",
                   summary:"HTML5 Webinar ",
                   startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
                   duration: new tizen.TimeDuration(1, "HOURS"),
                   location:"Huesca"};
     calendar = tizen.calendar.getDefaultCalendar("EVENT");
-    ev = new tizen.CalendarEvent(event_init);
+    ev = new tizen.CalendarEvent(eventInit);
     events = [ev];
     calendar.add(events[0]);
-    events[0].location = exp_location;
+    events[0].location = expLocation;
     calendar.updateBatch(events, successCB, errorCB, false);
 });
 
index 2a03ec466424b80238a626ce276fb514027de93d..d9d646aaa996d28fe0e6890409873120a97c8221 100644 (file)
@@ -19,6 +19,7 @@ Authors:
         Beata Koziarek <b.koziarek@samsung.com>
 -->
 
+<html>
 <head>
 <title>Calendar_update_item_TypeMismatch</title>
 <meta charset="utf-8">
@@ -43,10 +44,9 @@ t.step(function (){
         badEvent = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name: exceptionName},
-            function () {
-                calendar.update(badEvent);
-        }, exceptionName + " should be thrown - given incorrect items.");
+        assert_throws({name: exceptionName}, function () {
+            calendar.update(badEvent);
+        }, exceptionName + " should be thrown - given incorrect item");
     }
     cleanup(calendar);
     t.done();
index 4fd854ada8b3979a0819b5d9e446304aec97982c..eed1623ee398f37d5810683f222fd618583b9b95 100644 (file)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Test if putting a user errorCallback object in getCalendars method which was not created through the constructor but has all the properties failes." type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="CalendarManager_getCalendars_errorCallback_invalid_cb">
+      <testcase purpose="Check if CalendarManager.getCalendars method throws exception when errorCallback is invalid" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="CalendarManager_getCalendars_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Test if putting a user successCallback object in getCalendars method which was not created through the constructor but has all the properties failes." type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="CalendarManager_getCalendars_successCallback_invalid_cb">
+      <testcase purpose="Check if CalendarManager.getCalendars method throws exception when successCallback is invalid" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="CalendarManager_getCalendars_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_successCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Test if putting a user errorCallback object in removeBatch which was not created through the constructor but has all the properties failes." type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="Calendar_removeBatch_errorCallback_invalid_cb">
+      <testcase purpose="Check if Calendar.removeBatch method throws exception when errorCallback is invalid" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="Calendar_removeBatch_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Test if putting a user successCallback object in removeBatch which was not created through the constructor but has all the properties failes." type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="Calendar_removeBatch_successCallback_invalid_cb">
+      <testcase purpose="Check if Calendar.removeBatch method throws exception when successCallback is invalid" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="Calendar_removeBatch_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_successCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Test if putting a user successCallback object which was not created through the constructor but has all the properties failes in updateBatch method." type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="Calendar_updateBatch_successCallback_invalid_cb">
+      <testcase purpose="Check if Calendar.updateBatch method throws exception when successCallback is invalid" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P2" id="Calendar_updateBatch_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_successCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check whether 'updateBatch' method with successCallback works correctly updates several task items from the CalendarTask object asynchronously" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P1" id="Calendar_updateBatch_with_successCallback">
+      <testcase purpose="Check if Calendar.updateBatch method works correctly with successCallback" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P1" id="Calendar_updateBatch_with_successCallback">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_with_successCallback.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check whether 'updateBatch' method with updateAllInstances works correctly deletes several task items from the CalendarTask object asynchronously" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P1" id="Calendar_updateBatch_with_updateAllInstances">
+      <testcase purpose="Check if Calendar.updateBatch method works correctly" type="compliance" status="approved" component="TizenAPI/Social/Calendar" execution_type="auto" priority="P1" id="Calendar_updateBatch_with_updateAllInstances">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_with_updateAllInstances.html</test_script_entry>
         </description>
index 72d2cd3319e3666cc5dbbadd6342baf00993146c..7a9d85cf6a24ea8ee896413cd345b5ccb990e24f 100644 (file)
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Test if putting a user errorCallback object in getCalendars method which was not created through the constructor but has all the properties failes." component="TizenAPI/Social/Calendar" execution_type="auto" id="CalendarManager_getCalendars_errorCallback_invalid_cb">
+      <testcase purpose="Check if CalendarManager.getCalendars method throws exception when errorCallback is invalid" component="TizenAPI/Social/Calendar" execution_type="auto" id="CalendarManager_getCalendars_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_successCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Test if putting a user successCallback object in getCalendars method which was not created through the constructor but has all the properties failes." component="TizenAPI/Social/Calendar" execution_type="auto" id="CalendarManager_getCalendars_successCallback_invalid_cb">
+      <testcase purpose="Check if CalendarManager.getCalendars method throws exception when successCallback is invalid" component="TizenAPI/Social/Calendar" execution_type="auto" id="CalendarManager_getCalendars_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/CalendarManager_getCalendars_successCallback_invalid_cb.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Test if putting a user errorCallback object in removeBatch which was not created through the constructor but has all the properties failes." component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_removeBatch_errorCallback_invalid_cb">
+      <testcase purpose="Check if Calendar.removeBatch method throws exception when errorCallback is invalid" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_removeBatch_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_successCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Test if putting a user successCallback object in removeBatch which was not created through the constructor but has all the properties failes." component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_removeBatch_successCallback_invalid_cb">
+      <testcase purpose="Check if Calendar.removeBatch method throws exception when successCallback is invalid" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_removeBatch_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_removeBatch_successCallback_invalid_cb.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_successCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Test if putting a user successCallback object which was not created through the constructor but has all the properties failes in updateBatch method." component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_updateBatch_successCallback_invalid_cb">
+      <testcase purpose="Check if Calendar.updateBatch method throws exception when successCallback is invalid" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_updateBatch_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_successCallback_invalid_cb.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check whether 'updateBatch' method with successCallback works correctly updates several task items from the CalendarTask object asynchronously" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_updateBatch_with_successCallback">
+      <testcase purpose="Check if Calendar.updateBatch method works correctly with successCallback" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_updateBatch_with_successCallback">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_with_successCallback.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check whether 'updateBatch' method with updateAllInstances works correctly deletes several task items from the CalendarTask object asynchronously" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_updateBatch_with_updateAllInstances">
+      <testcase purpose="Check if Calendar.updateBatch method works correctly" component="TizenAPI/Social/Calendar" execution_type="auto" id="Calendar_updateBatch_with_updateAllInstances">
         <description>
           <test_script_entry>/opt/tct-calendar-tizen-tests/calendar/Calendar_updateBatch_with_updateAllInstances.html</test_script_entry>
         </description>