[Package] review
authorWitold Choinkowski <w.choinkowsk@samsung.com>
Fri, 4 Oct 2013 14:12:26 +0000 (16:12 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 8 Oct 2013 07:47:03 +0000 (07:47 +0000)
Change-Id: If2f364fb16c734328d69a08c48440cbbe1ed9193

68 files changed:
tct-package-tizen-tests/package/PackageInformationArraySuccessCallback_notexist.html
tct-package-tizen-tests/package/PackageInformationArraySuccessCallback_onsuccess.html
tct-package-tizen-tests/package/PackageInformationEventCallback_notexist.html
tct-package-tizen-tests/package/PackageInformationEventCallback_oninstalled.html
tct-package-tizen-tests/package/PackageInformationEventCallback_onuninstalled.html
tct-package-tizen-tests/package/PackageInformationEventCallback_onupdated.html
tct-package-tizen-tests/package/PackageInformation_appIds_attribute.html
tct-package-tizen-tests/package/PackageInformation_author_attribute.html
tct-package-tizen-tests/package/PackageInformation_dataSize_attribute.html
tct-package-tizen-tests/package/PackageInformation_description_attribute.html
tct-package-tizen-tests/package/PackageInformation_extend.html
tct-package-tizen-tests/package/PackageInformation_iconPath_attribute.html
tct-package-tizen-tests/package/PackageInformation_id_attribute.html
tct-package-tizen-tests/package/PackageInformation_lastModified_attribute.html
tct-package-tizen-tests/package/PackageInformation_name_attribute.html
tct-package-tizen-tests/package/PackageInformation_notexist.html
tct-package-tizen-tests/package/PackageInformation_totalSize_attribute.html
tct-package-tizen-tests/package/PackageInformation_version_attribute.html
tct-package-tizen-tests/package/PackageManagerObject_notexist.html
tct-package-tizen-tests/package/PackageManager_extend.html
tct-package-tizen-tests/package/PackageManager_getPackageInfo.html
tct-package-tizen-tests/package/PackageManager_getPackageInfo_exist.html
tct-package-tizen-tests/package/PackageManager_getPackageInfo_with_id.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_errorCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_errorCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_exist.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_missarg.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_successCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_successCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_getPackagesInfo_with_errorCallback.html
tct-package-tizen-tests/package/PackageManager_in_tizen.html
tct-package-tizen-tests/package/PackageManager_install.html
tct-package-tizen-tests/package/PackageManager_install_errorCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_install_errorCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_install_errorCallback_invoked.html
tct-package-tizen-tests/package/PackageManager_install_exist.html
tct-package-tizen-tests/package/PackageManager_install_missarg.html
tct-package-tizen-tests/package/PackageManager_install_progressCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_install_progressCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_install_without_errorCallback.html
tct-package-tizen-tests/package/PackageManager_notexist.html
tct-package-tizen-tests/package/PackageManager_setPackageInfoEventListener.html
tct-package-tizen-tests/package/PackageManager_setPackageInfoEventListener_eventCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_setPackageInfoEventListener_eventCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_setPackageInfoEventListener_exist.html
tct-package-tizen-tests/package/PackageManager_setPackageInfoEventListener_misarg.html
tct-package-tizen-tests/package/PackageManager_uninstall.html
tct-package-tizen-tests/package/PackageManager_uninstall_errorCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_uninstall_errorCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_uninstall_errorCallback_invoked.html
tct-package-tizen-tests/package/PackageManager_uninstall_exist.html
tct-package-tizen-tests/package/PackageManager_uninstall_missarg.html
tct-package-tizen-tests/package/PackageManager_uninstall_progressCallback_TypeMismatch.html
tct-package-tizen-tests/package/PackageManager_uninstall_progressCallback_invalid_cb.html
tct-package-tizen-tests/package/PackageManager_uninstall_without_errorCallback.html
tct-package-tizen-tests/package/PackageManager_unsetPackageInfoEventListener.html
tct-package-tizen-tests/package/PackageManager_unsetPackageInfoEventListener_exist.html
tct-package-tizen-tests/package/PackageManager_unsetPackageInfoEventListener_extra_argument.html
tct-package-tizen-tests/package/PackageProgressCallback_notexist.html
tct-package-tizen-tests/package/PackageProgressCallback_oncomplete_install.html
tct-package-tizen-tests/package/PackageProgressCallback_oncomplete_uninstall.html
tct-package-tizen-tests/package/PackageProgressCallback_onprogress_install.html
tct-package-tizen-tests/package/PackageProgressCallback_onprogress_uninstall.html
tct-package-tizen-tests/package/support/unitcommon.js [new file with mode: 0644]
tct-package-tizen-tests/resources/unitcommon.js [deleted file]
tct-package-tizen-tests/tests.full.xml
tct-package-tizen-tests/tests.xml

index 9e8b4efdd84cb08f17dd962029a0d6e93cd8699c..c51e175988b1c79d97fa9aa3a02d88ceb4a5abdb 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformationArraySuccessCallback_notexist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA CBNIO
 test(function () {
     check_no_interface_object("PackageInformationArraySuccessCallback");
-}, "PackageInformationArraySuccessCallback_notexist");
+}, document.title);
 
 </script>
 </body>
index 6594cde88690db92d69ae30f2b6074d2dccbbc04..c950c43562fac71c65dfa0fc70f561b795c766f2 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageInformationArraySuccessCallback_onsuccess</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 setup({timeout: 30000});
 
-var t = async_test("PackageInformationArraySuccessCallback_onsuccess", {timeout: 30000}), packageInformation,
+var t = async_test(document.title, {timeout: 30000}), packageInformation,
     packageInformationArraySuccessCallback, errorCallback;
 
 t.step(function () {
index e49742a1777d339fd7990d93dbff8f2bef14c775..b4321bed85a5822ea769a5be80e15a5d544f799a 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformationEventCallback_notexist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA CBNIO
 test(function () {
     check_no_interface_object("PackageInformationEventCallback");
-}, "PackageInformationEventCallback_notexist");
+}, document.title);
 
 </script>
 </body>
index 623eed684c94c7a7f70ce5312162dc6e2a07262e..64029a7c3477e99fc62708af5b0f0182e6c28b12 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformationEventCallback_oninstalled</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -42,7 +42,7 @@ Authors:
 setup({timeout: 90000});
 
 var packageInformationEventCallback,
-    t = async_test("PackageInformationEventCallback_oninstalled",  {timeout: 90000});
+    t = async_test(document.title,  {timeout: 90000});
 
 t.step(function () {
     packageInformationEventCallback = {
index 5eeba0967d7d75dbd378441de0fa9ed1f0f09379..a52230f7813308c979230a754fe8a23ce00ebc7a 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformationEventCallback_onuninstalled</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -42,7 +42,7 @@ Authors:
 setup({timeout: 90000});
 
 var packageInformationEventCallback,
-    t = async_test("PackageInformationEventCallback_onuninstalled",  {timeout: 90000});
+    t = async_test(document.title,  {timeout: 90000});
 
 t.step(function () {
     packageInformationEventCallback = {
index cad20c2660d421964fbf83a03c6da2ef804660d1..e0de646d1688875c51a6cd160d5fa970b3b43173 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformationEventCallback_onupdated</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -42,7 +42,7 @@ Authors:
 setup({timeout: 90000});
 
 var packageInformationEventCallback,
-    t = async_test("PackageInformationEventCallback_onupdated",  {timeout: 90000});
+    t = async_test(document.title,  {timeout: 90000});
 
 t.step(function () {
     packageInformationEventCallback = {
index 42e450894cadd9d106548faa8a1d0ca2606bf3c7..ef0d2c6404703232522b0996d0d46131a5b75652 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_appIds_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -48,7 +48,7 @@ test(function () {
 
     packageInformation.appIds = null;
     assert_array_equals(packageInformation.appIds, expectedValue, "PackageInformation.appIds is incorrect.");
-}, "PackageInformation_appIds_attribute");
+}, document.title);
 
 </script>
 </body>
index 9f73f97b3432e735671cd023d3823339017c69f6..a441d5dc8a40ba9b2ac5cc9f092e2fabf5755a2e 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_author_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ test(function () {
     var packageInformation = tizen.package.getPackageInfo(TCT_PACKAGE_INFO_TEST_PACKAGE_ID);
     assert_own_property(packageInformation, "author" , "PackageInformation does not own author property.");
     check_readonly(packageInformation, "author", TCT_PACKAGE_INFO_TEST_PACKAGE_AUTHOR, "string", "newValue");
-}, "PackageInformation_author_attribute");
+}, document.title);
 
 </script>
 </body>
index 2c9bec3bd5742e7bfda3639dfff13609d4e49e1e..408e0dbfcc4f7d062b33dba4aa705ab6b350c623 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_dataSize_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -51,7 +51,7 @@ test(function () {
     assert_type(packageInformation.dataSize, "long", "Incorrect type for PackageInformation.dataSize after assignment.");
     assert_not_equals(packageInformation.dataSize, null, "PackageInformation.dataSize can be modified.");
     assert_equals(packageInformation.dataSize, originalValue, "PackageInformation.dataSize can be modified.");
-}, "PackageInformation_dataSize_attribute");
+}, document.title);
 
 </script>
 </body>
index a27bbba72a4a5b82b4c3b50cea02658d7e7d279d..fa6f6b2128ba83c2b1c900685dfed36e917e210c 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_description_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ test(function () {
     var packageInformation = tizen.package.getPackageInfo(TCT_PACKAGE_INFO_TEST_PACKAGE_ID);
     assert_own_property(packageInformation, "description" , "PackageInformation does not own description property.");
     check_readonly(packageInformation, "description", TCT_PACKAGE_INFO_TEST_PACKAGE_DESCRIPTION, "string", "newValue");
-}, "PackageInformation_description_attribute");
+}, document.title);
 
 </script>
 </body>
index cbaf55da0903f00e7dfa6ff964dc074b911b4185..ff45411903cd1a7c274977c6311231b1f7b31ea3 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageInformation_extend</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -30,7 +30,7 @@ Authors:
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: PackageInformation_extend
-//==== LABEL check if PackageInformation is extendable
+//==== LABEL Check if PackageInformation is extendable
 //==== SPEC Tizen Web API:Application:Package:PackageInformation:PackageInformation U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/package.html
 //==== PRIORITY P3
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     var packageInformation = tizen.package.getPackageInfo();
     check_extensibility(packageInformation);
-}, "PackageInformation_extend");
+}, document.title);
 
 </script>
 </body>
index 325454f5a93dad861949efc03f3ca81415f9de9d..7e2191a838c7ec4be4adbe7808d3819f9bfa643f 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_iconPath_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -53,7 +53,7 @@ test(function () {
     assert_not_equals(packageInformation.iconPath, null, "PackageInformation.iconPath can be modified.");
     assert_equals(packageInformation.iconPath, originalValue, "PackageInformation.iconPath can be modified.");
 
-}, "PackageInformation_iconPath_attribute");
+}, document.title);
 
 </script>
 </body>
index 847325e0917fbf99ea55dd00d4ceb2e9ec9b095a..da4dde0964f87184347bacac0b8f609eb7e512d3 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_id_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ test(function () {
     var packageInformation = tizen.package.getPackageInfo(TCT_PACKAGE_INFO_TEST_PACKAGE_ID);
     assert_own_property(packageInformation, "id" , "PackageInformation does not own id property.");
     check_readonly(packageInformation, "id", TCT_PACKAGE_INFO_TEST_PACKAGE_ID, "string", "newValue");
-}, "PackageInformation_id_attribute");
+}, document.title);
 
 </script>
 </body>
index 72d94fa954a5ffeded2c9d4ee2fc97f5f50aa91f..52748a35c3fa9d51e115b1c4611364a0953b9887 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_lastModified_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -52,7 +52,7 @@ test(function () {
     assert_not_equals(packageInformation.lastModified, null, "PackageInformation.lastModified can be modified.");
     assert_equals(packageInformation.lastModified.getTime(), originalValue.getTime(), "PackageInformation.lastModified can be modified.");
 
-}, "PackageInformation_lastModified_attribute");
+}, document.title);
 
 </script>
 </body>
index 616343a109d09261691100744049c17f43dfb3d8..615f395c3c5d5ac38ca77dfcb65b29df93034791 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_name_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ test(function () {
     var packageInformation = tizen.package.getPackageInfo(TCT_PACKAGE_INFO_TEST_PACKAGE_ID);
     assert_own_property(packageInformation, "name" , "PackageInformation does not own name property.");
     check_readonly(packageInformation, "name", TCT_PACKAGE_INFO_TEST_PACKAGE_NAME, "string", "newValue");
-}, "PackageInformation_name_attribute");
+}, document.title);
 
 </script>
 </body>
index 86e14bf958649538db662d2fdbe367d3cbd8124d..a3c79eaee64de60790bafb218a7b77919c9fff02 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_notexist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA NIO
 test(function () {
     check_no_interface_object("PackageInformation");
-}, "PackageInformation_notexist");
+}, document.title);
 
 </script>
 </body>
index 5cba5dd955896afa3be7a1043c4e74b17bc2f8df..7e83b7868747aa5a7428973ca24fc150466e275d 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_totalSize_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -51,7 +51,7 @@ test(function () {
     assert_type(packageInformation.totalSize, "long", "Incorrect type for PackageInformation.totalSize after assignment.");
     assert_not_equals(packageInformation.totalSize, null, "PackageInformation.totalSize can be modified.");
     assert_equals(packageInformation.totalSize, originalValue, "PackageInformation.totalSize can be modified.");
-}, "PackageInformation_totalSize_attribute");
+}, document.title);
 
 </script>
 </body>
index f41f03eb15eb54a496c482b931463a57b3c12df7..6fa05578b6c2baa44a98efd70a377217d6438963 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageInformation_version_attribute</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ test(function () {
     var packageInformation = tizen.package.getPackageInfo(TCT_PACKAGE_INFO_TEST_PACKAGE_ID);
     assert_own_property(packageInformation, "version" , "PackageInformation does not own version property.");
     check_readonly(packageInformation, "version", TCT_PACKAGE_INFO_TEST_PACKAGE_VERSION, "string", "newValue");
-}, "PackageInformation_version_attribute");
+}, document.title);
 
 </script>
 </body>
index 04d473c68d3bb188ef361ef9b7bce7a56da3fb2b..91847584ff3c16adc1950b394dcb2430c089a33f 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManagerObject_notexist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA NIO
 test(function () {
     check_no_interface_object("PackageManagerObject");
-}, "PackageManagerObject_notexist");
+}, document.title);
 
 </script>
 </body>
index 0f73e6bdbd57082268b22480f0936ec00f865178..68b8e5b78270561c4a2fcfa45b849977e5da098a 100644 (file)
@@ -22,8 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_extend</title>
-<script src="../resources/unitcommon.js"></script>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -31,14 +30,14 @@ Authors:
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: PackageManager_extend
-//==== LABEL check if PackageManager is extendable
+//==== LABEL Check if PackageManager is extendable
 //==== SPEC Tizen Web API:Application:Package:PackageManager:PackageManager U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/package.html
 //==== PRIORITY P3
 //==== TEST_CRITERIA OBX
 test(function () {
     check_extensibility(tizen.package);
-}, "PackageManager_extend");
+}, document.title);
 
 </script>
 </body>
index 7fe55be1318712316e09b52a6edd5d087a9d1c15..05ccedbfcafab4cb72399fd6c290cab30adf44ee 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_getPackageInfo</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -63,7 +63,7 @@ test(function () {
     assert_equals(packageInformation.description, TCT_PACKAGE_TIZEN_TESTS_PACKAGE_DESCRIPTION,
         "PackageInformation.description is incorect.");
 
-}, "PackageManager_getPackageInfo");
+}, document.title);
 
 </script>
 </body>
index 565e83133bed3cdde23616af0157c4247b82a17b..150ef7ce5deffb45a5ca67afe91a2a4dc7d10d50 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_getPackageInfo_exist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     assert_true("getPackageInfo" in tizen.package, "No getPackageInfo method in tizen.package");
     check_method_exists(tizen.package, "getPackageInfo");
-}, "PackageManager_getPackageInfo_exist");
+}, document.title);
 
 </script>
 </body>
index cf2e70052e7337593c8e04a3c826bdddc3a0318e..4b0652f47cf9a0795d01f6674092f8f38aa20785 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_getPackageInfo_with_id</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -63,7 +63,7 @@ test(function () {
     assert_equals(packageInformation.description, TCT_PACKAGE_INFO_TEST_PACKAGE_DESCRIPTION,
         "PackageInformation.description is incorect.");
 
-}, "PackageManager_getPackageInfo_with_id");
+}, document.title);
 
 </script>
 </body>
index 417484144600205360cb594ab63511e897ffba92..d5b64c5fbf5eddc40325f87f710199dd44b0746d 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MMINA MR
 setup({timeout: 90000});
 
-var t = async_test("PackageManager_getPackagesInfo", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
     packageInformationArraySuccessCallback, returnedValue = null;
 
 t.step(function () {
index 5621f2bab83071346e97ed9d8baa4605b64af9d1..dd0ec3d3615e4fc6c00c165fa007ecd67f3dcf61 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo_errorCallback_TypeMismatch</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_getPackagesInfo_errorCallback_TypeMismatch", {timeout: 30000}), conversionTable,
+var t = async_test(document.title, {timeout: 30000}), conversionTable,
     packageInformationArraySuccessCallback, exceptionName, errorCallback, i;
 
 t.step(function () {
@@ -52,7 +52,7 @@ t.step(function () {
         errorCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.getPackagesInfo(packageInformationArraySuccessCallback, errorCallback);
             }, exceptionName + " should be thrown - given incorrect errorCallback: " + errorCallback + ".");
index b810085fa3ff92852f7650dbcf5a1c8f85d838f5..08f6f2662c8504eb1f76974ffdf2b154ae0bd1db 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo_errorCallback_invalid_cb</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_getPackagesInfo_errorCallback_invalid_cb", {timeout: 30000}), exceptionName = "TypeMismatchError",
+var t = async_test(document.title, {timeout: 30000}), exceptionName = "TypeMismatchError",
     invalidCallback, packageInformationArraySuccessCallback;
 
 t.step(function () {
@@ -52,7 +52,7 @@ t.step(function () {
         })
     };
 
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.package.getPackagesInfo(packageInformationArraySuccessCallback, invalidCallback);
         }, exceptionName + " should be thrown - given incorrect error callback - object.");
index 95a95d604355683b55f0df8ce12cd5378d110d9b..a37d0ce7a0e6af3f54fdc5ce81672e36e13034ff 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_getPackagesInfo_exist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     assert_true("getPackagesInfo" in tizen.package, "No getPackagesInfo method in tizen.package");
     check_method_exists(tizen.package, "getPackagesInfo");
-}, "PackageManager_getPackagesInfo_exist");
+}, document.title);
 
 </script>
 </body>
index 16801dd9a8c837048e1de47f61324df6900d0770..be3fd106bc44aa8b58a8eda14c7fe062c31b3eba 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo_missarg</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,11 +37,11 @@ Authors:
 //==== TEST_CRITERIA MMA
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_getPackagesInfo_missarg", {timeout: 30000}),
+var t = async_test(document.title, {timeout: 30000}),
     exceptionName = "TypeMismatchError";
 
 t.step(function () {
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.package.getPackagesInfo();
         }, exceptionName + " should be thrown - missing successCallback.");
index 53315d5f8d8d07c10ea4863f4605b7a755cad68c..6aa94279421c47703b5a4a3f1c71017d73bf8cf8 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo_successCallback_TypeMismatch</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 <body>
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_getPackagesInfo_successCallback_TypeMismatch", {timeout: 30000}), conversionTable,
+var t = async_test(document.title, {timeout: 30000}), conversionTable,
     packageInformationArraySuccessCallback, exceptionName, errorCallback, i;
 
 t.step(function () {
@@ -51,7 +51,7 @@ t.step(function () {
         packageInformationArraySuccessCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.getPackagesInfo(packageInformationArraySuccessCallback, errorCallback);
             }, exceptionName + " should be thrown - given incorrect successCallback: " + packageInformationArraySuccessCallback + ".");
index bc0e3d53d14a128317b0a2d6d96355a6c1fb7d79..048649c146020ea8ad55bd620ee236a44e9a722b 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo_successCallback_invalid_cb</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 <body>
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_getPackagesInfo_successCallback_invalid_cb", {timeout: 30000}), exceptionName = "TypeMismatchError",
+var t = async_test(document.title, {timeout: 30000}), exceptionName = "TypeMismatchError",
     errorCallback, invalidCallback;
 
 t.step(function () {
@@ -51,7 +51,7 @@ t.step(function () {
         assert_unreached("ErrorCallback invoked: " + error.name + ": " + error.message);
     });
 
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.package.getPackagesInfo(invalidCallback, errorCallback);
         }, exceptionName + " should be thrown - given incorrect successCallback - object.");
index 0fc8430d266d16f9d4a97ae72145a78c996a6faf..e22f8de363b3bf0d28d03417c13699754f93b89e 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_getPackagesInfo_with_errorCallback</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MOA
 setup({timeout: 90000});
 
-var t = async_test("PackageManager_getPackagesInfo_with_errorCallback", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
     packageInformationArraySuccessCallback, errorCallback;
 
 t.step(function () {
index c67ad53fb2886faa52ff0e3dcfff71155df51e70..7319d4a243f3a79504cc44f62356edc0b7a5bcca 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_in_tizen</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 test(function () {
     assert_true("package" in tizen, "No package in tizen.");
     check_readonly(tizen, "package", tizen.package, "object", "dummyValue");
-}, "PackageManager_in_tizen");
+}, document.title);
 
 </script>
 </body>
index 3b53cc545f79e9de2d34dccfe0e60dc4fec6ad2f..388abfcd0ebb65505fa82d99e55a16e2ff76c29a 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA MOA MR MAST
 setup({timeout: 90000});
 
-var t = async_test("PackageManager_install", {timeout: 90000}), wasInProgress = false, installProgressCallback, installError,
+var t = async_test(document.title, {timeout: 90000}), wasInProgress = false, installProgressCallback, installError,
     returnedValue = null, packageInformation;
 
 t.step(function () {
index f0cb08d35b78d934d455476152dcf089785a71f0..b0ba7df50cf53cb42da534ea4bd70c702d3ce037 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_errorCallback_TypeMismatch</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_install_errorCallback_TypeMismatch", {timeout: 30000}), exceptionName,
+var t = async_test(document.title, {timeout: 30000}), exceptionName,
     incorrectCallback, installProgressCallback, conversionTable, i;
 
 t.step(function () {
@@ -48,7 +48,7 @@ t.step(function () {
             assert_unreached("onprogress invoked.");
         }),
         oncomplete: t.step_func(function (packageId) {
-            assert_unreached("oncomplete invoked,");
+            assert_unreached("oncomplete invoked, ");
         })
     };
 
@@ -57,7 +57,7 @@ t.step(function () {
         incorrectCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
         function () {
             tizen.package.install(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, installProgressCallback, incorrectCallback);
         }, exceptionName + " should be thrown - given incorrect errorCallback: " + incorrectCallback + ".");
index 0db8b64415b7f46220c64e39f9e09851aefcbf89..5d5e7f0a650649b5b5ada2fca993feb8d5b38d1d 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_errorCallback_invalid_cb</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_install_errorCallback_invalid_cb", {timeout: 30000}), exceptionName = "TypeMismatchError",
+var t = async_test(document.title, {timeout: 30000}), exceptionName = "TypeMismatchError",
     invalidCallback, installProgressCallback;
 
 t.step(function () {
@@ -48,7 +48,7 @@ t.step(function () {
             assert_unreached("onprogress invoked.");
         }),
         oncomplete: t.step_func(function (packageId) {
-            assert_unreached("oncomplete invoked,");
+            assert_unreached("oncomplete invoked, ");
         })
     };
 
@@ -58,7 +58,7 @@ t.step(function () {
         })
     };
 
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.package.install(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, installProgressCallback, invalidCallback);
         }, exceptionName + " should be thrown - given incorrect errorCallback - object.");
index 322c1374752b1e0f44abb6047a19372cfa547e94..fa5990115c7c96b27ea678cae19412b11d1b4fe3 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_errorCallback_invoked</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MERRCB
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_install_errorCallback_invoked", {timeout: 30000}), installProgressCallback, installError;
+var t = async_test(document.title, {timeout: 30000}), installProgressCallback, installError;
 
 t.step(function () {
     installProgressCallback = {
index 0e6c02b506e26f4210c467a7a31d648df5601ac4..beaadd4e4f74065d3bda20bc22b595c94da7b950 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_exist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     assert_true("install" in tizen.package, "No install method in tizen.package");
     check_method_exists(tizen.package, "install");
-}, "PackageManager_install_exist");
+}, document.title);
 
 </script>
 </body>
index 96b0595b0dd9e5529b2797723673137fdae4bf81..2775f97073e278d9a9f6b674fd0551805031c7a1 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_missarg</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,10 +37,10 @@ Authors:
 //==== TEST_CRITERIA MMA
 test(function () {
     var exceptionName = "TypeMismatchError";
-    assert_throws({name : exceptionName}, function () {
+    assert_throws({name: exceptionName}, function () {
         tizen.package.install(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH);
     }, exceptionName + " should be thrown - missing argument.");
-}, "PackageManager_install_missarg");
+}, document.title);
 
 </script>
 </body>
index 840112f1fc96677cc1c35a15835d932e8da83a69..9367c69c0106bb6dd5b1dfbe48d991eb7d2504c2 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_progressCallback_TypeMismatch</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_install_progressCallback_TypeMismatch", {timeout: 30000}), installProgressCallback, installError,
+var t = async_test(document.title, {timeout: 30000}), installProgressCallback, installError,
     exceptionName, i, conversionTable;
 
 t.step(function () {
@@ -53,7 +53,7 @@ t.step(function () {
         installProgressCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.install(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, installProgressCallback, installError);
             }, exceptionName + " should be thrown - given incorrect listener: " + installProgressCallback + ".");
index 7f0ef7bde6814e2c1c9918e11c31f10a5f1a1b25..f93a2237b5456aaebe6510bc888e31730284e56e 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_progressCallback_invalid_cb</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MTL
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_install_progressCallback_invalid_cb", {timeout: 30000}), exceptionName,
+var t = async_test(document.title, {timeout: 30000}), exceptionName,
     incorrectListeners, i, installError, installProgressCallback;
 
 t.step(function () {
@@ -51,7 +51,7 @@ t.step(function () {
     for(i = 0; i < incorrectListeners.length; i++) {
         installProgressCallback  = incorrectListeners[i][0];
         exceptionName = incorrectListeners[i][1];
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.install(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, installProgressCallback, installError);
             }, exceptionName + " should be thrown - given incorrect listener.");
index a22923edcfecdad5011e01fb25d34d774b973eb9..3c30050cdd881b855d2f1609bc7e7fa5fbd2ade6 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_install_without_errorCallback</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA MMINA MR MAST
 setup({timeout: 90000});
 
-var t = async_test("PackageManager_install_without_errorCallback", {timeout: 90000}), wasInProgress = false, installProgressCallback,
+var t = async_test(document.title, {timeout: 90000}), wasInProgress = false, installProgressCallback,
     returnedValue = null, packageInformation;
 
 t.step(function () {
index d2ab0457c8736cb5e81335986fdd3838a56cfdc9..237f1fa9ba7b420b6a69249522ce2b3c1002fcdc 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_notexist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA NIO
 test(function () {
     check_no_interface_object("PackageManager");
-}, "PackageManager_notexist");
+}, document.title);
 
 </script>
 </body>
index 7e6841b4e6f94e2fec7c71cc3eee035a5cca54c7..3f84f8507d8a44dc6e6a2712da8551cddf2d4859 100644 (file)
@@ -24,7 +24,7 @@ Authors:
 <head>
 <title>PackageManager_setPackageInfoEventListener</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -44,7 +44,7 @@ test(function () {
     } finally {
         tizen.package.unsetPackageInfoEventListener();
     }
-}, "PackageManager_setPackageInfoEventListener");
+}, document.title);
 
 </script>
 </body>
index c39bdfb13e92094f6f5e6a60caf8989101474ab3..d84b86e4e73ce5e5d1e875e173cfe1316623b051 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_setPackageInfoEventListener_eventCallback_TypeMismatch</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_setPackageInfoEventListener_eventCallback_TypeMismatch", {timeout: 30000}), conversionTable,
+var t = async_test(document.title, {timeout: 30000}), conversionTable,
     packageInformationEventCallback, exceptionName, i;
 
 t.step(function () {
@@ -48,7 +48,7 @@ t.step(function () {
         packageInformationEventCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
             }, exceptionName + " should be thrown - given incorrect listener: " + packageInformationEventCallback + ".");
index d4a307588193651c0c37e51eaf5d9758e5ceaf64..6a6cda37ca33de9ad5b3e88283b55f10799910be 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_setPackageInfoEventListener_eventCallback_invalid_cb</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MTL
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_setPackageInfoEventListener_eventCallback_invalid_cb", {timeout: 30000}), exceptionName,
+var t = async_test(document.title, {timeout: 30000}), exceptionName,
     incorrectListeners, i, packageInformationEventCallback;
 
 t.step(function () {
@@ -46,7 +46,7 @@ t.step(function () {
     for(i = 0; i < incorrectListeners.length; i++) {
         packageInformationEventCallback  = incorrectListeners[i][0];
         exceptionName = incorrectListeners[i][1];
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
             }, exceptionName + " should be thrown - given incorrect successCallback.");
index 8dee203833dfed5e7efd2573b0d96e33215dc5cc..a8ed7748d702ed6a98d56a49d218d733b0892adc 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_setPackageInfoEventListener_exist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     assert_true("setPackageInfoEventListener" in tizen.package, "No setPackageInfoEventListener method in tizen.package");
     check_method_exists(tizen.package, "setPackageInfoEventListener");
-}, "PackageManager_setPackageInfoEventListener_exist");
+}, document.title);
 
 </script>
 </body>
index 22576007c2a9369463524b612cf89c18c26294e4..0ab4ca24b3013fb00c5c8be84859c4fa80688cc2 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 <html>
 <head>
 <title>PackageManager_setPackageInfoEventListener_misarg</title>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,11 +37,11 @@ Authors:
 test(function () {
     var exceptionName = "TypeMismatchError";
 
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.package.setPackageInfoEventListener();
         }, exceptionName + " should be thrown - not given any argument.");
-}, "PackageManager_setPackageInfoEventListener_misarg");
+}, document.title);
 
 </script>
 </body>
index 8a1278b9648580c052e1448c3486b71720430fc4..e00a0edd6f8e809b3d3f274cf2dbe9cd1ad482e9 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA MOA MR MAST
 setup({timeout: 90000});
 
-var t = async_test("PackageManager_uninstall", {timeout: 90000}), wasInProgress = false,
+var t = async_test(document.title, {timeout: 90000}), wasInProgress = false,
     uninstallProgressCallback, uninstallError, returnedValue = null;
 
 t.step(function () {
@@ -55,7 +55,7 @@ t.step(function () {
             assert_true(wasInProgress, "onprogress callback was not invoked.");
             assert_equals(packageId, TCT_PACKAGE_MANAGER_TEST_PACKAGE_ID, "Incorrect packageId.");
 
-            assert_throws({name : "NotFoundError"},
+            assert_throws(NOT_FOUND_EXCEPTION,
                 function () {
                     tizen.package.getPackageInfo(TCT_PACKAGE_MANAGER_TEST_PACKAGE_ID);
                 }, "Package is still installed.");
index 54b4ab9e667b4fcc3de7c1e47125c32acd0b0e17..9e2128c0d4afb76dabf9c3fef2b1eab86c89b0b8 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_errorCallback_TypeMismatch</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_uninstall_errorCallback_TypeMismatch", {timeout: 30000}),
+var t = async_test(document.title, {timeout: 30000}),
     exceptionName, incorrectCallback, uninstallProgressCallback, conversionTable, i;
 
 t.step(function () {
@@ -48,7 +48,7 @@ t.step(function () {
             assert_unreached("onprogress invoked.");
         }),
         oncomplete: t.step_func(function (packageId) {
-            assert_unreached("oncomplete invoked,");
+            assert_unreached("oncomplete invoked, ");
         })
     };
 
@@ -57,7 +57,7 @@ t.step(function () {
         incorrectCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
         function () {
             tizen.package.uninstall(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, uninstallProgressCallback, incorrectCallback);
         }, exceptionName + " should be thrown - given incorrect errorCallback: " + incorrectCallback + ".");
index a633a9d25d70f59e2ff64b905ebe49453716fb38..35dd9623ac68bb2021b4c50759d23b4ba84ebb8b 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_errorCallback_invalid_cb</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_uninstall_errorCallback_invalid_cb", {timeout: 30000}),
+var t = async_test(document.title, {timeout: 30000}),
     exceptionName = "TypeMismatchError", invalidCallback, uninstallProgressCallback;
 
 t.step(function () {
@@ -58,7 +58,7 @@ t.step(function () {
         })
     };
 
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.package.uninstall(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, uninstallProgressCallback, invalidCallback);
         }, exceptionName + " should be thrown - given incorrect errorCallback - object.");
index 7b504b391747dcb80155fba14b0886d29767a646..822d38b1227c65be31aea3304bc204d734b42e62 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_errorCallback_invoked</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MERRCB
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_uninstall_errorCallback_invoked", {timeout: 30000}),
+var t = async_test(document.title, {timeout: 30000}),
     uninstallProgressCallback, uninstallError;
 
 t.step(function () {
index e651892fe02c858e0e13a2be662ceff7bb74bf16..7c193d2ea90c415bcc333640bc3acea9cfbebec8 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_exist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     assert_true("uninstall" in tizen.package, "No uninstall method in tizen.package");
     check_method_exists(tizen.package, "uninstall");
-}, "PackageManager_uninstall_exist");
+}, document.title);
 
 </script>
 </body>
index 743b647bce0330d0a89bc624b743b1413a538160..b17bc8f19b55d07710aa8afac40088291e50c661 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_missarg</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,10 +37,10 @@ Authors:
 //==== TEST_CRITERIA MMA
 test(function () {
     var exceptionName = "TypeMismatchError";
-    assert_throws({name : exceptionName}, function () {
+    assert_throws({name: exceptionName}, function () {
         tizen.package.uninstall(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH);
     }, exceptionName + " should be thrown - missing argument.");
-}, "PackageManager_uninstall_missarg");
+}, document.title);
 
 </script>
 </body>
index a4d6684990f845aec1be997c55587e9f8c596e7f..580a40578357ed6d46ae1d4f715bc773803ffe64 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_progressCallback_TypeMismatch</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MC
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_uninstall_progressCallback_TypeMismatch", {timeout: 30000}), uninstallProgressCallback, uninstallError,
+var t = async_test(document.title, {timeout: 30000}), uninstallProgressCallback, uninstallError,
     exceptionName, i, conversionTable;
 
 t.step(function () {
@@ -53,7 +53,7 @@ t.step(function () {
         uninstallProgressCallback  = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.uninstall(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, uninstallProgressCallback, uninstallError);
             }, exceptionName + " should be thrown - given incorrect listener: " + uninstallProgressCallback + ".");
index 158fcd317f96884673331ae37108347cf0b9e1be..ac46be1c32cf4c3094a0909387fab0525bbeb0d5 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_progressCallback_invalid_cb</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -39,7 +39,7 @@ Authors:
 //==== TEST_CRITERIA MTL
 setup({timeout: 30000});
 
-var t = async_test("PackageManager_uninstall_progressCallback_invalid_cb", {timeout: 30000}), exceptionName,
+var t = async_test(document.title, {timeout: 30000}), exceptionName,
     incorrectListeners, i, uninstallError, uninstallProgressCallback;
 
 t.step(function () {
@@ -51,7 +51,7 @@ t.step(function () {
     for(i = 0; i < incorrectListeners.length; i++) {
         uninstallProgressCallback  = incorrectListeners[i][0];
         exceptionName = incorrectListeners[i][1];
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.package.uninstall(TCT_PACKAGE_MANAGER_TEST_PACKAGE_PATH, uninstallProgressCallback, uninstallError);
             }, exceptionName + " should be thrown - given incorrect listener.");
index 74dd88196b587ccfe99553a41f692ef4ad22107e..e3298e4b9b32d095bfa9cb2e578e733b03dcd05e 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_uninstall_without_errorCallback</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA MMINA MR MAST
 setup({timeout: 90000});
 
-var t = async_test("PackageManager_uninstall_without_errorCallback", {timeout: 90000}), wasInProgress = false,
+var t = async_test(document.title, {timeout: 90000}), wasInProgress = false,
     uninstallProgressCallback, returnedValue = null;
 
 t.step(function () {
@@ -55,7 +55,7 @@ t.step(function () {
             assert_true(wasInProgress, "onprogress callback was not invoked.");
             assert_equals(packageId, TCT_PACKAGE_MANAGER_TEST_PACKAGE_ID, "Incorrect packageId.");
 
-            assert_throws({name : "NotFoundError"},
+            assert_throws(NOT_FOUND_EXCEPTION,
                 function () {
                     tizen.package.getPackageInfo(TCT_PACKAGE_MANAGER_TEST_PACKAGE_ID);
                 }, "Package is still installed.");
index 763e59c608cec8b4d20a598bd7e39d8c83597b86..aa2e717d6e8e0688355eaa4ba3358c988835e79b 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_unsetPackageInfoEventListener</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -42,7 +42,7 @@ Authors:
 setup({timeout: 90000});
 
 var packageInformationEventCallback, returnedValue = null,
-    t = async_test("PackageManager_unsetPackageInfoEventListener",  {timeout: 90000});
+    t = async_test(document.title,  {timeout: 90000});
 
 t.step(function () {
     packageInformationEventCallback = {
index c9d4a87dd609adf9a27f8ff544ff9760dc203821..f9715b01863d56f8da4b2f518f8aeef1ecb27249 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_unsetPackageInfoEventListener_exist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 test(function () {
     assert_true("unsetPackageInfoEventListener" in tizen.package, "No unsetPackageInfoEventListener method in tizen.package");
     check_method_exists(tizen.package, "unsetPackageInfoEventListener");
-}, "PackageManager_unsetPackageInfoEventListener_exist");
+}, document.title);
 
 </script>
 </body>
index 3f35b6f004b244b203d3369c7bb435383476247c..06abba043bce9c288e4aa4032f0d50a3599553cf 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageManager_unsetPackageInfoEventListener_extra_argument</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MNAEX
 test(function () {
     checkExtraArgument(tizen.package, "unsetPackageInfoEventListener");
-}, "PackageManager_unsetPackageInfoEventListener_extra_argument");
+}, document.title);
 
 </script>
 </body>
index e466a8e3e0faf786b2c3c1c406a4df1efaeb4fc9..5b5eb6be5580a4d3a8051f15148134fc5f084bd0 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageProgressCallback_notexist</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA CBNIO
 test(function () {
     check_no_interface_object("PackageProgressCallback");
-}, "PackageProgressCallback_notexist");
+}, document.title);
 
 </script>
 </body>
index 991c8e3dee361754ecde1591772125929e1ab921..61ac9f7ab1025ad9a390047b4735e8dae3bb0718 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageProgressCallback_oncomplete_install</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 setup({timeout: 90000});
 
-var t = async_test("PackageProgressCallback_oncomplete_install", {timeout: 90000}), installProgressCallback, installError;
+var t = async_test(document.title, {timeout: 90000}), installProgressCallback, installError;
 
 t.step(function () {
     installProgressCallback = {
index 8c44a7de9569a4b273e157cf9f6d2417163e2013..44d95654937aeb848f331fa71c09bd2fde171add 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageProgressCallback_oncomplete_uninstall</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 setup({timeout: 90000});
 
-var t = async_test("PackageProgressCallback_oncomplete_uninstall", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
     uninstallProgressCallback, uninstallError;
 
 t.step(function () {
index 316bd2e1aa461017960460ea3028471476b93f02..68d5370edce7af5ed00504339fdc8d19e1adec6b 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageProgressCallback_onprogress_install</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 setup({timeout: 90000});
 
-var t = async_test("PackageProgressCallback_onprogress_install", {timeout: 90000}), wasInProgress = false,
+var t = async_test(document.title, {timeout: 90000}), wasInProgress = false,
     installProgressCallback, installError;
 
 t.step(function () {
index 120e8506f290a8c5172ec48f213f161cd23df7f0..6bcf637c95da2ae46c77f8140908c9f5f175d740 100644 (file)
@@ -23,7 +23,7 @@ Authors:
 <head>
 <title>PackageProgressCallback_onprogress_uninstall</title>
 <meta charset="utf-8"/>
-<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 <script type="text/javascript" src="support/package_common.js"></script>
 </head>
 
@@ -41,7 +41,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 setup({timeout: 90000});
 
-var t = async_test("PackageProgressCallback_onprogress_uninstall", {timeout: 90000}), wasInProgress = false,
+var t = async_test(document.title, {timeout: 90000}), wasInProgress = false,
     uninstallProgressCallback, uninstallError;
 
 t.step(function () {
diff --git a/tct-package-tizen-tests/package/support/unitcommon.js b/tct-package-tizen-tests/package/support/unitcommon.js
new file mode 100644 (file)
index 0000000..9f972c1
--- /dev/null
@@ -0,0 +1,559 @@
+/*
+
+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:
+
+ */
+
+
+MIN_BYTE = -128;
+MAX_BYTE = 127;
+MIN_OCTET = 0;
+MAX_OCTET = 255;
+MIN_SHORT = -32768;
+MAX_SHORT = 32767;
+MIN_UNSIGNED_SHORT = 0;
+MAX_UNSIGNED_SHORT = 65535;
+MIN_LONG = -2147483648;
+MAX_LONG = 2147483647;
+MIN_UNSIGNED_LONG = 0;
+MAX_UNSIGNED_LONG = 4294967295;
+MIN_LONG_LONG = -9223372036854775808;
+MAX_LONG_LONG = 9223372036854775807;
+MIN_UNSIGNED_LONG_LONG = 0;
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
+
+TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
+NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
+INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
+IO_EXCEPTION = {name: 'IOError'};
+SECURITY_EXCEPTION = {name: 'SecurityError'};
+
+
+(function () {
+   var head_src = document.head.innerHTML;
+   if (head_src.search(/\/testharness.js\W/) === -1) {
+       document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
+   }
+   if (head_src.search(/\/testharnessreport.js\W/) === -1) {
+       document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
+   }
+})();
+
+var _registered_types = {};
+
+function _resolve_registered_type(type) {
+    while (type in _registered_types) {
+        type = _registered_types[type];
+    }
+    return type;
+}
+
+/**
+ * Method checks extra argument for none argument method.
+ * The only check is that method will not throw an exception.
+ * Example usage:
+ * checkExtraArgument(tizen.notification, "removeAll");
+ *
+ * @param object object
+ * @param methodName string - name of the method
+ */
+function checkExtraArgument(object, methodName) {
+    var extraArgument = [
+        null,
+        undefined,
+        "Tizen",
+        1,
+        false,
+        ["one", "two"],
+        {argument: 1},
+        function () {}
+    ], i;
+
+    for (i = 0; i < extraArgument.length; i++) {
+        object[methodName](extraArgument[i]);
+    }
+}
+
+/**
+ * Method to validate conversion.
+ * Example usage:
+ *   conversionTable = getTypeConversionExceptions("functionObject", true);
+ *   for(i = 0; i < conversionTable.length; i++) {
+ *       errorCallback = conversionTable[i][0];
+ *       exceptionName = conversionTable[i][1];
+ *
+ *       assert_throws({name : exceptionName},
+ *       function () {
+ *           tizen.systemsetting.setProperty("HOME_SCREEN",
+ *               propertyValue, successCallback, errorCallback);
+ *       }, exceptionName + " should be thrown - given incorrect errorCallback.");
+ *   }
+ *
+ * @param conversionType
+ * @param isOptional
+ * @returns table of tables which contain value (index 0) and exceptionName (index 1)
+ *
+ */
+function getTypeConversionExceptions(conversionType, isOptional) {
+    var exceptionName = "TypeMismatchError",
+        conversionTable;
+    switch (conversionType) {
+        case "enum":
+            conversionTable = [
+                [undefined, exceptionName],
+                [null, exceptionName],
+                [0, exceptionName],
+                [true, exceptionName],
+                ["dummyInvalidEnumValue", exceptionName],
+                [{ }, exceptionName]
+            ];
+            break;
+        case "double":
+            conversionTable = [
+                [undefined, exceptionName],
+                [NaN, exceptionName],
+                [Number.POSITIVE_INFINITY, exceptionName],
+                [Number.NEGATIVE_INFINITY, exceptionName],
+                ["TIZEN", exceptionName],
+                [{ name : "TIZEN" }, exceptionName],
+                [function () { }, exceptionName]
+            ];
+            break;
+        case "object":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "functionObject":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [[], exceptionName],
+                [{ }, exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "array":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [{ }, exceptionName],
+                [function () { }, exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        case "dictionary":
+            conversionTable = [
+                [true, exceptionName],
+                [false, exceptionName],
+                [NaN, exceptionName],
+                [0, exceptionName],
+                ["", exceptionName],
+                ["TIZEN", exceptionName],
+                [undefined, exceptionName]
+            ];
+            if (!isOptional) {
+                conversionTable.push([null, exceptionName]);
+            }
+            break;
+        default:
+            assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
+    };
+
+    return conversionTable;
+}
+
+
+function assert_type(obj, type, description) {
+    var org_type = type, prop_name, prop_type, prop_value;
+
+    type = _resolve_registered_type(type);
+
+    if (typeof (type) === 'string') {
+        type = type.toLowerCase();
+        switch (type) {
+            case 'object':
+            case 'string':
+            case 'number':
+            case 'function':
+            case 'boolean':
+            case 'undefined':
+            case 'xml':
+                assert_equals(typeof (obj), type, description);
+                break;
+            case 'null':
+                assert_true(obj === null, description);
+                break;
+            case 'array':
+                assert_true(Array.isArray(obj), description);
+                break;
+            case 'date':
+                assert_true(obj instanceof Date, description);
+                break;
+            case 'byte':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'octet':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'short':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'unsigned short':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'unsigned long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            case 'long long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
+                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+                break;
+            case 'unsigned long long':
+                assert_equals(typeof (obj), 'number', description);
+                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
+                assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
+                assert_equals(obj % 1, 0, description + " - value is not an integer.");
+                break;
+            default:
+                assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
+        }
+    } else if (typeof (type) === 'function') {
+        assert_true(obj instanceof type, description);
+    } else if (typeof (type) === 'object') {
+        for (prop_name in type) {
+            prop_type = type[prop_name];
+            if (prop_type === 'function') {
+                assert_inherits(obj, prop_name);
+                assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
+            } else {
+                assert_own_property(obj, prop_name);
+            }
+        }
+    } else {
+        assert_unreached('Fix your test. Wrong type ' + org_type);
+    }
+}
+
+function register_type(alias, type_spec) {
+    _registered_types[alias] = type_spec;
+}
+
+/**
+ * Method to check if attribute is const.
+ * Example usage:
+ * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
+ *
+ * @param obj  object to test which  has const attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+    var tmp;
+    if (expectedValue === valueToAssign) {
+        assert_unreached("Fix your test. The same values given for "  + attributeName +
+            " in 'value' and 'valueToSet' arguments.");
+    }
+    if (typeof (attributeName) === "string") {
+        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
+        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
+        if (typeof (expectedType) !== "undefined") {
+            if (expectedValue === null) {
+                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
+            } else {
+                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
+            }
+        } else {
+            assert_unreached("Fix your test. Wrong type " + expectedType);
+        }
+        tmp = obj[attributeName];
+        obj[attributeName] = valueToAssign;
+        assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
+    } else {
+        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
+    }
+}
+
+/**
+ * Method to check if attribute is readonly.
+ * Example usage:
+ * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
+ *
+ * @param obj  object to test which  has readonly attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+    check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
+}
+
+/**
+ * Method to check if attribute can be set to null.
+ * Example usage:
+ * check_not_nullable(syncInfo, "mode");
+ *
+ * @param obj object to test which has not nullable attribute
+ * @param attributeName attribute name.
+ */
+function check_not_nullable(obj, attributeName)
+{   var old_value = obj[attributeName];
+    obj[attributeName] = null;
+    assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
+    obj[attributeName] = old_value;
+}
+
+/**
+ * Method to check NoInterfaceObject
+ * Example usage:
+ * check_no_interface_object("BluetoothAdapter")
+ *
+ * @param interfaceName interface name
+ */
+function check_no_interface_object(interfaceName) {
+    assert_throws({name: "TypeError"}, function () {
+        tizen[interfaceName]();
+    },"Wrong call as a function");
+    assert_throws({name: "TypeError"}, function () {
+        new tizen[interfaceName]();
+    },"Wrong call as a new function");
+    assert_throws({name: "TypeError"}, function () {
+        ({}) instanceof tizen[interfaceName];
+    },"instanceof exception");
+    assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
+}
+
+
+/**
+ * Method to check Constructors
+ * Example usage:
+ * check_constructor("BluetoothAdapter")
+ *
+ * @param constructorName constructor name
+ */
+
+function check_constructor(constructorName) {
+    assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
+    assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
+    assert_throws({
+        name: "TypeError"
+    }, function () {
+        tizen[constructorName]();
+    }, "Constructor called as function.");
+}
+
+/**
+ * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
+ * That method also checks if given method exists in a given object.
+ * Example usage:
+ * check_method_exists(tizen.notification, "get");
+ *
+ * @param obj object with method
+ * @param methodName name of the method to check.
+ */
+function check_method_exists(obj, methodName) {
+    assert_type(obj[methodName], 'function', "Method does not exist.");
+}
+
+/**
+ * Method to check extensibility of given object.
+ * Method checks if new attribute and method can be added.
+ * Example usage:
+ * check_extensibility(tizen.notification);
+ *
+ * @param obj object to check
+ */
+function check_extensibility(obj) {
+    var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
+    obj.newDummyMethod = function() {
+        return dummyMethodResult;
+    }
+    assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
+
+    obj.newDummyAttribute = dummyAttribute;
+    assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
+}
+
+/**
+ * Method to check if attribute can be modify.
+ * Example usage:
+ * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
+ *
+ * @param obj  object to test which has not readonly attribute
+ * @param attributeName attribute name.
+ * @param expectedValue expected value of provided attribute name
+ * @param expectedType expected type of provided attribute name
+ * @param valueToAssign value to assign in order to check if attribute value can be modified
+ */
+function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
+    if (expectedValue === valueToAssign) {
+        assert_unreached("Fix your test. The same values given for "  + attributeName +
+            " in 'value' and 'valueToSet' arguments.");
+    }
+    if (typeof (attributeName) === "string") {
+        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
+        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
+        if (typeof (expectedType) !== "undefined") {
+            if (expectedValue === null) {
+                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
+            } else {
+                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
+            }
+        } else {
+            assert_unreached("Fix your test. Wrong type " + expectedType);
+        }
+        obj[attributeName] = valueToAssign;
+        assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
+    } else {
+        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
+    }
+}
+
+/**
+ * Method to check if whole array can be overwritten with an invalid value.
+ * Sample usage:
+ * check_invalid_array_assignments(message, "to", false);
+ *
+ * @param obj object which has the array as its property
+ * @param array name of the array to check
+ * @param isNullable indicates if the array can be null
+ */
+function check_invalid_array_assignments(obj, array, isNullable) {
+    var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
+        val = obj[array], i;
+
+    if (!isNullable) {
+        obj[array] = null;
+        assert_not_equals(obj[array], null, "Non-nullable array was set to null");
+        assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
+        assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
+    }
+
+    for (i = 0 ; i < args.length ; i++) {
+        obj[array] = args[i];
+        assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
+        assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
+    }
+}
+
+/**
+ * Method to check if an object can be overwritten with an invalid value.
+ * Sample usage:
+ * check_invalid_object_assignments(message, "body", false);
+ *
+ * @param parentObj object which has the 'obj' object as its property
+ * @param obj name of the object to check
+ * @param isNullable indicates if the object can be null
+ */
+function check_invalid_obj_assignments(parentObj, obj, isNullable) {
+    var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
+        val = parentObj[obj], i;
+
+    if (!isNullable) {
+        parentObj[obj] = null;
+        assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
+    }
+
+    for (i = 0 ; i < args.length ; i++) {
+        parentObj[obj] = args[i];
+        assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
+    }
+}
+
+/**
+ * Method to validate conversion for listeners.
+ * Example usage:
+ * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
+ * for(i = 0; i < incorrectListeners.length; i++) {
+ *     packageInformationEventCallback  = incorrectListeners[i][0];
+ *     exceptionName = incorrectListeners[i][1];
+ *     assert_throws({name : exceptionName},
+ *        function () {
+ *             tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
+ *         }, exceptionName + " should be thrown - given incorrect successCallback.");
+ * }
+ *
+ *
+ * @param callbackNames Array with names
+ * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
+ *
+ */
+function getListenerConversionExceptions(callbackNames) {
+    var result = [], conversionTable, i, j, listenerName;
+    conversionTable = getTypeConversionExceptions("functionObject", false);
+
+    for (i = 0; i < callbackNames.length; i++) {
+        for (j = 0; j < conversionTable.length; j++) {
+            listenerName = {};
+            listenerName[callbackNames[i]] = conversionTable[j][0];
+            result.push([listenerName, conversionTable[j][1]]);
+        }
+    }
+
+    return result;
+}
diff --git a/tct-package-tizen-tests/resources/unitcommon.js b/tct-package-tizen-tests/resources/unitcommon.js
deleted file mode 100644 (file)
index 9f972c1..0000000
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
-
-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:
-
- */
-
-
-MIN_BYTE = -128;
-MAX_BYTE = 127;
-MIN_OCTET = 0;
-MAX_OCTET = 255;
-MIN_SHORT = -32768;
-MAX_SHORT = 32767;
-MIN_UNSIGNED_SHORT = 0;
-MAX_UNSIGNED_SHORT = 65535;
-MIN_LONG = -2147483648;
-MAX_LONG = 2147483647;
-MIN_UNSIGNED_LONG = 0;
-MAX_UNSIGNED_LONG = 4294967295;
-MIN_LONG_LONG = -9223372036854775808;
-MAX_LONG_LONG = 9223372036854775807;
-MIN_UNSIGNED_LONG_LONG = 0;
-MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
-
-TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
-NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
-INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
-IO_EXCEPTION = {name: 'IOError'};
-SECURITY_EXCEPTION = {name: 'SecurityError'};
-
-
-(function () {
-   var head_src = document.head.innerHTML;
-   if (head_src.search(/\/testharness.js\W/) === -1) {
-       document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
-   }
-   if (head_src.search(/\/testharnessreport.js\W/) === -1) {
-       document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
-   }
-})();
-
-var _registered_types = {};
-
-function _resolve_registered_type(type) {
-    while (type in _registered_types) {
-        type = _registered_types[type];
-    }
-    return type;
-}
-
-/**
- * Method checks extra argument for none argument method.
- * The only check is that method will not throw an exception.
- * Example usage:
- * checkExtraArgument(tizen.notification, "removeAll");
- *
- * @param object object
- * @param methodName string - name of the method
- */
-function checkExtraArgument(object, methodName) {
-    var extraArgument = [
-        null,
-        undefined,
-        "Tizen",
-        1,
-        false,
-        ["one", "two"],
-        {argument: 1},
-        function () {}
-    ], i;
-
-    for (i = 0; i < extraArgument.length; i++) {
-        object[methodName](extraArgument[i]);
-    }
-}
-
-/**
- * Method to validate conversion.
- * Example usage:
- *   conversionTable = getTypeConversionExceptions("functionObject", true);
- *   for(i = 0; i < conversionTable.length; i++) {
- *       errorCallback = conversionTable[i][0];
- *       exceptionName = conversionTable[i][1];
- *
- *       assert_throws({name : exceptionName},
- *       function () {
- *           tizen.systemsetting.setProperty("HOME_SCREEN",
- *               propertyValue, successCallback, errorCallback);
- *       }, exceptionName + " should be thrown - given incorrect errorCallback.");
- *   }
- *
- * @param conversionType
- * @param isOptional
- * @returns table of tables which contain value (index 0) and exceptionName (index 1)
- *
- */
-function getTypeConversionExceptions(conversionType, isOptional) {
-    var exceptionName = "TypeMismatchError",
-        conversionTable;
-    switch (conversionType) {
-        case "enum":
-            conversionTable = [
-                [undefined, exceptionName],
-                [null, exceptionName],
-                [0, exceptionName],
-                [true, exceptionName],
-                ["dummyInvalidEnumValue", exceptionName],
-                [{ }, exceptionName]
-            ];
-            break;
-        case "double":
-            conversionTable = [
-                [undefined, exceptionName],
-                [NaN, exceptionName],
-                [Number.POSITIVE_INFINITY, exceptionName],
-                [Number.NEGATIVE_INFINITY, exceptionName],
-                ["TIZEN", exceptionName],
-                [{ name : "TIZEN" }, exceptionName],
-                [function () { }, exceptionName]
-            ];
-            break;
-        case "object":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        case "functionObject":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [[], exceptionName],
-                [{ }, exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        case "array":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [{ }, exceptionName],
-                [function () { }, exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        case "dictionary":
-            conversionTable = [
-                [true, exceptionName],
-                [false, exceptionName],
-                [NaN, exceptionName],
-                [0, exceptionName],
-                ["", exceptionName],
-                ["TIZEN", exceptionName],
-                [undefined, exceptionName]
-            ];
-            if (!isOptional) {
-                conversionTable.push([null, exceptionName]);
-            }
-            break;
-        default:
-            assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
-    };
-
-    return conversionTable;
-}
-
-
-function assert_type(obj, type, description) {
-    var org_type = type, prop_name, prop_type, prop_value;
-
-    type = _resolve_registered_type(type);
-
-    if (typeof (type) === 'string') {
-        type = type.toLowerCase();
-        switch (type) {
-            case 'object':
-            case 'string':
-            case 'number':
-            case 'function':
-            case 'boolean':
-            case 'undefined':
-            case 'xml':
-                assert_equals(typeof (obj), type, description);
-                break;
-            case 'null':
-                assert_true(obj === null, description);
-                break;
-            case 'array':
-                assert_true(Array.isArray(obj), description);
-                break;
-            case 'date':
-                assert_true(obj instanceof Date, description);
-                break;
-            case 'byte':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'octet':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'short':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'unsigned short':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'unsigned long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            case 'long long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
-                assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
-                break;
-            case 'unsigned long long':
-                assert_equals(typeof (obj), 'number', description);
-                assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
-                assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
-                assert_equals(obj % 1, 0, description + " - value is not an integer.");
-                break;
-            default:
-                assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
-        }
-    } else if (typeof (type) === 'function') {
-        assert_true(obj instanceof type, description);
-    } else if (typeof (type) === 'object') {
-        for (prop_name in type) {
-            prop_type = type[prop_name];
-            if (prop_type === 'function') {
-                assert_inherits(obj, prop_name);
-                assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
-            } else {
-                assert_own_property(obj, prop_name);
-            }
-        }
-    } else {
-        assert_unreached('Fix your test. Wrong type ' + org_type);
-    }
-}
-
-function register_type(alias, type_spec) {
-    _registered_types[alias] = type_spec;
-}
-
-/**
- * Method to check if attribute is const.
- * Example usage:
- * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
- *
- * @param obj  object to test which  has const attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
-    var tmp;
-    if (expectedValue === valueToAssign) {
-        assert_unreached("Fix your test. The same values given for "  + attributeName +
-            " in 'value' and 'valueToSet' arguments.");
-    }
-    if (typeof (attributeName) === "string") {
-        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
-        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
-        if (typeof (expectedType) !== "undefined") {
-            if (expectedValue === null) {
-                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
-            } else {
-                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
-            }
-        } else {
-            assert_unreached("Fix your test. Wrong type " + expectedType);
-        }
-        tmp = obj[attributeName];
-        obj[attributeName] = valueToAssign;
-        assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
-    } else {
-        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
-    }
-}
-
-/**
- * Method to check if attribute is readonly.
- * Example usage:
- * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
- *
- * @param obj  object to test which  has readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
-    check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
-}
-
-/**
- * Method to check if attribute can be set to null.
- * Example usage:
- * check_not_nullable(syncInfo, "mode");
- *
- * @param obj object to test which has not nullable attribute
- * @param attributeName attribute name.
- */
-function check_not_nullable(obj, attributeName)
-{   var old_value = obj[attributeName];
-    obj[attributeName] = null;
-    assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
-    obj[attributeName] = old_value;
-}
-
-/**
- * Method to check NoInterfaceObject
- * Example usage:
- * check_no_interface_object("BluetoothAdapter")
- *
- * @param interfaceName interface name
- */
-function check_no_interface_object(interfaceName) {
-    assert_throws({name: "TypeError"}, function () {
-        tizen[interfaceName]();
-    },"Wrong call as a function");
-    assert_throws({name: "TypeError"}, function () {
-        new tizen[interfaceName]();
-    },"Wrong call as a new function");
-    assert_throws({name: "TypeError"}, function () {
-        ({}) instanceof tizen[interfaceName];
-    },"instanceof exception");
-    assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
-}
-
-
-/**
- * Method to check Constructors
- * Example usage:
- * check_constructor("BluetoothAdapter")
- *
- * @param constructorName constructor name
- */
-
-function check_constructor(constructorName) {
-    assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
-    assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
-    assert_throws({
-        name: "TypeError"
-    }, function () {
-        tizen[constructorName]();
-    }, "Constructor called as function.");
-}
-
-/**
- * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
- * That method also checks if given method exists in a given object.
- * Example usage:
- * check_method_exists(tizen.notification, "get");
- *
- * @param obj object with method
- * @param methodName name of the method to check.
- */
-function check_method_exists(obj, methodName) {
-    assert_type(obj[methodName], 'function', "Method does not exist.");
-}
-
-/**
- * Method to check extensibility of given object.
- * Method checks if new attribute and method can be added.
- * Example usage:
- * check_extensibility(tizen.notification);
- *
- * @param obj object to check
- */
-function check_extensibility(obj) {
-    var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
-    obj.newDummyMethod = function() {
-        return dummyMethodResult;
-    }
-    assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
-
-    obj.newDummyAttribute = dummyAttribute;
-    assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
-}
-
-/**
- * Method to check if attribute can be modify.
- * Example usage:
- * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
- *
- * @param obj  object to test which has not readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
-    if (expectedValue === valueToAssign) {
-        assert_unreached("Fix your test. The same values given for "  + attributeName +
-            " in 'value' and 'valueToSet' arguments.");
-    }
-    if (typeof (attributeName) === "string") {
-        assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
-        assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
-        if (typeof (expectedType) !== "undefined") {
-            if (expectedValue === null) {
-                assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
-            } else {
-                assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
-            }
-        } else {
-            assert_unreached("Fix your test. Wrong type " + expectedType);
-        }
-        obj[attributeName] = valueToAssign;
-        assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
-    } else {
-        assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
-    }
-}
-
-/**
- * Method to check if whole array can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_array_assignments(message, "to", false);
- *
- * @param obj object which has the array as its property
- * @param array name of the array to check
- * @param isNullable indicates if the array can be null
- */
-function check_invalid_array_assignments(obj, array, isNullable) {
-    var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
-        val = obj[array], i;
-
-    if (!isNullable) {
-        obj[array] = null;
-        assert_not_equals(obj[array], null, "Non-nullable array was set to null");
-        assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
-        assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
-    }
-
-    for (i = 0 ; i < args.length ; i++) {
-        obj[array] = args[i];
-        assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
-        assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
-    }
-}
-
-/**
- * Method to check if an object can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_object_assignments(message, "body", false);
- *
- * @param parentObj object which has the 'obj' object as its property
- * @param obj name of the object to check
- * @param isNullable indicates if the object can be null
- */
-function check_invalid_obj_assignments(parentObj, obj, isNullable) {
-    var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
-        val = parentObj[obj], i;
-
-    if (!isNullable) {
-        parentObj[obj] = null;
-        assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
-    }
-
-    for (i = 0 ; i < args.length ; i++) {
-        parentObj[obj] = args[i];
-        assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
-    }
-}
-
-/**
- * Method to validate conversion for listeners.
- * Example usage:
- * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
- * for(i = 0; i < incorrectListeners.length; i++) {
- *     packageInformationEventCallback  = incorrectListeners[i][0];
- *     exceptionName = incorrectListeners[i][1];
- *     assert_throws({name : exceptionName},
- *        function () {
- *             tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
- *         }, exceptionName + " should be thrown - given incorrect successCallback.");
- * }
- *
- *
- * @param callbackNames Array with names
- * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
- *
- */
-function getListenerConversionExceptions(callbackNames) {
-    var result = [], conversionTable, i, j, listenerName;
-    conversionTable = getTypeConversionExceptions("functionObject", false);
-
-    for (i = 0; i < callbackNames.length; i++) {
-        for (j = 0; j < conversionTable.length; j++) {
-            listenerName = {};
-            listenerName[callbackNames[i]] = conversionTable[j][0];
-            result.push([listenerName, conversionTable[j][1]]);
-        }
-    }
-
-    return result;
-}
index 97397a8e3e4564a40ebaadeef264d3294b6c210c..a2c61b2da9cfa0b083601ad3c21c12edb0f46e41 100644 (file)
@@ -87,7 +87,7 @@
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if PackageInformation is extendable" type="compliance" status="approved" component="TizenAPI/Application/Package" execution_type="auto" priority="P3" id="PackageInformation_extend">
+      <testcase purpose="Check if PackageInformation is extendable" type="compliance" status="approved" component="TizenAPI/Application/Package" execution_type="auto" priority="P3" id="PackageInformation_extend">
         <description>
           <test_script_entry>/opt/tct-package-tizen-tests/package/PackageInformation_extend.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if PackageManager is extendable" type="compliance" status="approved" component="TizenAPI/Application/Package" execution_type="auto" priority="P3" id="PackageManager_extend">
+      <testcase purpose="Check if PackageManager is extendable" type="compliance" status="approved" component="TizenAPI/Application/Package" execution_type="auto" priority="P3" id="PackageManager_extend">
         <description>
           <test_script_entry>/opt/tct-package-tizen-tests/package/PackageManager_extend.html</test_script_entry>
         </description>
index b4c955d97eea65b8868562b7db049dadd11473c5..667e58e6ed36ba62444bfe9305ca3a468b49b316 100644 (file)
@@ -38,7 +38,7 @@
           <test_script_entry>/opt/tct-package-tizen-tests/package/PackageInformation_description_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if PackageInformation is extendable" component="TizenAPI/Application/Package" execution_type="auto" id="PackageInformation_extend">
+      <testcase purpose="Check if PackageInformation is extendable" component="TizenAPI/Application/Package" execution_type="auto" id="PackageInformation_extend">
         <description>
           <test_script_entry>/opt/tct-package-tizen-tests/package/PackageInformation_extend.html</test_script_entry>
         </description>
@@ -83,7 +83,7 @@
           <test_script_entry>/opt/tct-package-tizen-tests/package/PackageManagerObject_notexist.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if PackageManager is extendable" component="TizenAPI/Application/Package" execution_type="auto" id="PackageManager_extend">
+      <testcase purpose="Check if PackageManager is extendable" component="TizenAPI/Application/Package" execution_type="auto" id="PackageManager_extend">
         <description>
           <test_script_entry>/opt/tct-package-tizen-tests/package/PackageManager_extend.html</test_script_entry>
         </description>