[Contact] Fixed handling method synchronously on removeBatch operation
authorJunghyuk Park <junghyuk.park@samsung.com>
Tue, 10 Sep 2013 11:19:48 +0000 (20:19 +0900)
committerJunghyuk Park <junghyuk.park@samsung.com>
Tue, 10 Sep 2013 11:19:48 +0000 (20:19 +0900)
Change-Id: Ib5eaabd27eb7635474e410c26d2d4d969edd7d24

tct-contact-tizen-tests/contact/AddressBook_removeBatch_without_successCallback.html [new file with mode: 0755]
tct-contact-tizen-tests/contact/AddressBook_removeBatch_withouth_successCallback.html [deleted file]
tct-contact-tizen-tests/tests.full.xml [changed mode: 0644->0755]
tct-contact-tizen-tests/tests.xml [changed mode: 0644->0755]

diff --git a/tct-contact-tizen-tests/contact/AddressBook_removeBatch_without_successCallback.html b/tct-contact-tizen-tests/contact/AddressBook_removeBatch_without_successCallback.html
new file mode 100755 (executable)
index 0000000..1c0c75f
--- /dev/null
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<!--
+
+Copyright (c) 2013 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Authors:
+    Tomasz Paciorek <t.paciorek@samsung.com>
+-->
+<html lang="en">
+
+<head>
+<title>Contact/UTC_contact</title>
+<meta charset="utf-8">
+<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/contact_common.js"></script>
+</head>
+
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: AddressBook_removeBatch_without_successCallback
+//==== LABEL check various arguments for AddressBook::removeBatch() method without successCallback
+//==== PRIORITY P2
+//==== SPEC Tizen Web API:Social:Contact:AddressBook:removeBatch M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/contact.html#removeBatchid2521347
+//==== TEST_CRITERIA MMINA MR
+
+var t = async_test("AddressBook_removeBatch_without_successCallback");
+
+t.step(function () {
+    var addressbook,
+    rawContacts = [ {
+        firstName : "firstName1",
+        lastName : "lastName1",
+        nicknames : "nicknames1",
+        email : "email1@email1.com",
+        phone : "111111111"
+    }, {
+        firstName : "firstName2",
+        lastName : "lastName2",
+        nicknames : "nicknames2",
+        email : "email2@email2.com",
+        phone : "222222222"
+    }, {
+        firstName : "firstName3",
+        lastName : "lastName3",
+        nicknames : "nicknames3",
+        email : "email3@email3.com",
+        phone : "333333333"
+    } ], i, contactIds = [], len, j, leng, contactsFoundCB, contactsRemoveCB, contact, returnedValue;
+
+    addressbook = tizen.contact.getDefaultAddressBook();
+
+    contactsRemoveCB = t.step_func(function (contacts) {
+        assert_type(contacts, "array", "contacts should be array");
+        returnedValue = addressbook.removeBatch([ contactIds[0], contactIds[1], contactIds[2] ]);
+        assert_equals(returnedValue, undefined, "Incorrect value returned.");
+        t.done();
+    });
+
+    contactsFoundCB = t.step_func(function (contacts) {
+        for (i = 0, len = contacts.length; i < len; i++) {
+            addressbook.remove(contacts[i].id);
+        }
+        for (j = 0, leng = rawContacts.length; j < leng; j++) {
+            contact = new tizen.Contact({
+                name : new tizen.ContactName({
+                    firstName : rawContacts[j].firstName,
+                    lastName : rawContacts[j].lastName,
+                    nicknames : [ rawContacts[j].nicknames ]
+                }),
+                emails : [ new tizen.ContactEmailAddress(
+                    rawContacts[j].email
+                )],
+                phoneNumbers : [ new tizen.ContactPhoneNumber(
+                    rawContacts[j].phone
+                )]
+            });
+            addressbook.add(contact);
+            contactIds.push(contact.id);
+            addressbook.find(contactsRemoveCB);
+        }
+    });
+
+    addressbook.find(contactsFoundCB);
+});
+
+</script>
+</body>
+</html>
diff --git a/tct-contact-tizen-tests/contact/AddressBook_removeBatch_withouth_successCallback.html b/tct-contact-tizen-tests/contact/AddressBook_removeBatch_withouth_successCallback.html
deleted file mode 100644 (file)
index c4377f9..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
-
-Licensed under the Apache License, Version 2.0 (the License);
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-
-Authors:
-    Tomasz Paciorek <t.paciorek@samsung.com>
--->
-<html lang="en">
-
-<head>
-<title>Contact/UTC_contact</title>
-<meta charset="utf-8">
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="support/contact_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: AddressBook_removeBatch_withouth_successCallback
-//==== LABEL check various arguments for AddressBook::removeBatch() method withouth_successCallback
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Social:Contact:AddressBook:removeBatch M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/contact.html#removeBatchid2521347
-//==== TEST_CRITERIA MMINA MR
-
-var t = async_test("AddressBook_removeBatch_withouth_successCallback");
-
-t.step(function () {
-    var addressbook,
-    rawContacts = [ {
-        firstName : "firstName1",
-        lastName : "lastName1",
-        nicknames : "nicknames1",
-        email : "email1@email1.com",
-        phone : "111111111"
-    }, {
-        firstName : "firstName2",
-        lastName : "lastName2",
-        nicknames : "nicknames2",
-        email : "email2@email2.com",
-        phone : "222222222"
-    }, {
-        firstName : "firstName3",
-        lastName : "lastName3",
-        nicknames : "nicknames3",
-        email : "email3@email3.com",
-        phone : "333333333"
-    } ], i, contactIds = [], len, j, leng, contactsFoundCB, contactsRemoveCB, contact, returnedValue;
-
-    addressbook = tizen.contact.getDefaultAddressBook();
-    contactsFoundCB = t.step_func(function (contacts) {
-        for (i = 0, len = contacts.length; i < len; i++) {
-            addressbook.remove(contacts[i].id);
-        }
-        for (j = 0, leng = rawContacts.length; j < leng; j++) {
-            contact = new tizen.Contact({
-                name : new tizen.ContactName({
-                    firstName : rawContacts[j].firstName,
-                    lastName : rawContacts[j].lastName,
-                    nicknames : [ rawContacts[j].nicknames ]
-                }),
-                emails : [ new tizen.ContactEmailAddress(
-                    rawContacts[j].email
-                )],
-                phoneNumbers : [ new tizen.ContactPhoneNumber(
-                    rawContacts[j].phone
-                )]
-            });
-            addressbook.add(contact);
-            contactIds.push(contact.id);
-        }
-    });
-
-    addressbook.find(contactsFoundCB);
-
-    contactsRemoveCB = t.step_func(function (contacts) {
-        assert_type(contacts, "array", "contacts should be array");
-        returnedValue = addressbook.removeBatch([ contactIds[0], contactIds[1], contactIds[2] ]);
-        assert_equals(returnedValue, undefined, "Incorrect value returned.");
-        t.done();
-    });
-    addressbook.find(contactsRemoveCB);
-});
-
-</script>
-</body>
-</html>
old mode 100644 (file)
new mode 100755 (executable)
index cb224ea..ded169f
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check various arguments for AddressBook::removeBatch() method withouth_successCallback" type="compliance" status="approved" component="TizenAPI/Social/Contact" execution_type="auto" priority="P2" id="AddressBook_removeBatch_withouth_successCallback">
+      <testcase purpose="check various arguments for AddressBook::removeBatch() method without successCallback" type="compliance" status="approved" component="TizenAPI/Social/Contact" execution_type="auto" priority="P2" id="AddressBook_removeBatch_without_successCallback">
         <description>
-          <test_script_entry>/opt/tct-contact-tizen-tests/contact/AddressBook_removeBatch_withouth_successCallback.html</test_script_entry>
+          <test_script_entry>/opt/tct-contact-tizen-tests/contact/AddressBook_removeBatch_without_successCallback.html</test_script_entry>
         </description>
         <specs>
           <spec>
old mode 100644 (file)
new mode 100755 (executable)
index 7dddede..813a3e3
           <test_script_entry>/opt/tct-contact-tizen-tests/contact/AddressBook_removeBatch_missarg.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check various arguments for AddressBook::removeBatch() method withouth_successCallback" component="TizenAPI/Social/Contact" execution_type="auto" id="AddressBook_removeBatch_withouth_successCallback">
+      <testcase purpose="check various arguments for AddressBook::removeBatch() method without successCallback" component="TizenAPI/Social/Contact" execution_type="auto" id="AddressBook_removeBatch_without_successCallback">
         <description>
-          <test_script_entry>/opt/tct-contact-tizen-tests/contact/AddressBook_removeBatch_withouth_successCallback.html</test_script_entry>
+          <test_script_entry>/opt/tct-contact-tizen-tests/contact/AddressBook_removeBatch_without_successCallback.html</test_script_entry>
         </description>
       </testcase>
       <testcase purpose="check various arguments for AddressBook::updateBatch() method without_successCallback" component="TizenAPI/Social/Contact" execution_type="auto" id="AddressBook_updateBatch_without_successCallback">