[Download] code consistency improvement
authorPiotr Szydelko <p.szydelko@samsung.com>
Fri, 4 Oct 2013 09:48:01 +0000 (11:48 +0200)
committerPiotr Szydelko <p.szydelko@samsung.com>
Tue, 8 Oct 2013 06:46:40 +0000 (08:46 +0200)
Change-Id: If618f012dd15fe283bf71c6d40e6188633f98042

53 files changed:
tct-download-tizen-tests/download/DownloadCallback_notexist.html
tct-download-tizen-tests/download/DownloadCallback_oncanceled.html
tct-download-tizen-tests/download/DownloadCallback_oncompleted.html
tct-download-tizen-tests/download/DownloadCallback_onfailed.html
tct-download-tizen-tests/download/DownloadCallback_onpaused.html
tct-download-tizen-tests/download/DownloadCallback_onprogress.html
tct-download-tizen-tests/download/DownloadManagerObject_download_exists.html
tct-download-tizen-tests/download/DownloadManagerObject_notexist.html
tct-download-tizen-tests/download/DownloadManager_cancel.html
tct-download-tizen-tests/download/DownloadManager_cancel_exist.html
tct-download-tizen-tests/download/DownloadManager_extend.html
tct-download-tizen-tests/download/DownloadManager_getDownloadRequest.html
tct-download-tizen-tests/download/DownloadManager_getDownloadRequest_exist.html
tct-download-tizen-tests/download/DownloadManager_getMIMEType.html
tct-download-tizen-tests/download/DownloadManager_getMIMEType_exist.html
tct-download-tizen-tests/download/DownloadManager_getState.html
tct-download-tizen-tests/download/DownloadManager_getState_exist.html
tct-download-tizen-tests/download/DownloadManager_getState_using.html
tct-download-tizen-tests/download/DownloadManager_in_tizen.html
tct-download-tizen-tests/download/DownloadManager_notexist.html
tct-download-tizen-tests/download/DownloadManager_pause.html
tct-download-tizen-tests/download/DownloadManager_pause_exist.html
tct-download-tizen-tests/download/DownloadManager_resume.html
tct-download-tizen-tests/download/DownloadManager_resume_exist.html
tct-download-tizen-tests/download/DownloadManager_setListener.html
tct-download-tizen-tests/download/DownloadManager_setListener_downloadCallback_TypeMismatch.html
tct-download-tizen-tests/download/DownloadManager_setListener_downloadCallback_invalid_cb.html
tct-download-tizen-tests/download/DownloadManager_setListener_exist.html
tct-download-tizen-tests/download/DownloadManager_setListener_missarg.html
tct-download-tizen-tests/download/DownloadManager_setListener_null.html
tct-download-tizen-tests/download/DownloadManager_start.html
tct-download-tizen-tests/download/DownloadManager_start_downloadCallback_TypeMismatch.html
tct-download-tizen-tests/download/DownloadManager_start_downloadCallback_invalid_cb.html
tct-download-tizen-tests/download/DownloadManager_start_downloadRequest_TypeMismatch.html
tct-download-tizen-tests/download/DownloadManager_start_downloadRequest_invalid_obj.html
tct-download-tizen-tests/download/DownloadManager_start_exist.html
tct-download-tizen-tests/download/DownloadManager_start_missarg.html
tct-download-tizen-tests/download/DownloadManager_start_with_downloadCallback.html
tct-download-tizen-tests/download/DownloadManager_start_with_extra_argument.html
tct-download-tizen-tests/download/DownloadRequest_constructor.html
tct-download-tizen-tests/download/DownloadRequest_destination_attribute.html
tct-download-tizen-tests/download/DownloadRequest_exist.html
tct-download-tizen-tests/download/DownloadRequest_extend.html
tct-download-tizen-tests/download/DownloadRequest_fileName_attribute.html
tct-download-tizen-tests/download/DownloadRequest_httpHeader_attribute.html
tct-download-tizen-tests/download/DownloadRequest_networkType_attribute.html
tct-download-tizen-tests/download/DownloadRequest_url_attribute.html
tct-download-tizen-tests/download/support/download_common.js [new file with mode: 0644]
tct-download-tizen-tests/download/support/downloadcommon.js [deleted file]
tct-download-tizen-tests/download/support/unitcommon.js [new file with mode: 0644]
tct-download-tizen-tests/resources/unitcommon.js [deleted file]
tct-download-tizen-tests/tests.full.xml
tct-download-tizen-tests/tests.xml

index 358699a2e11332693b6acd1910eb4b70bfca4944..9b181355dc1940dc0e016434849eea9c20bc1076 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadCallback_notexist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script>
 //==== TEST: DownloadCallback_notexist
-//==== LABEL: check if is possible to call DownloadCallback in new expresion
+//==== LABEL Check if is possible to call DownloadCallback in new expresion
 //==== PRIORITY: P3
 //==== SPEC: Tizen Web API:Content:Download:DownloadCallback:DownloadCallback U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -38,7 +38,7 @@ Authors:
 
 test(function () {
     check_no_interface_object("DownloadCallback");
-}, "DownloadCallback_notexist");
+}, document.title);
 
 </script>
 </body>
index d13a2edd0ac74db9a2fda7acb1b2b91a0db30637..4e1f87547f6f3cc088ffb285e65a2cf801a83560 100644 (file)
@@ -22,14 +22,14 @@ Authors:
 <html>
 <head>
 <title>DownloadCallback_oncanceled</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadCallback_oncanceled
-//==== LABEL: Test whether the type of each argument is equal to the specified for oncanceled callback.
+//==== LABEL Test whether the type of each argument is equal to the specified for oncanceled callback.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadCallback:oncanceled M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 
 setup({timeout: 90000});
-var t = async_test("DownloadCallback_oncanceled", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     downloadRequest, downloadId;
 t.step(function () {
     listener = {
@@ -46,7 +46,7 @@ t.step(function () {
                 tizen.download.cancel(id);
             } catch (e) { }
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
         oncanceled: t.step_func(function (id) {
@@ -54,10 +54,10 @@ t.step(function () {
             assert_equals(id, downloadId, "id is diffrent");
             t.done();
         }),
-        oncompleted : t.step_func(function (id, fullPath) {
+        oncompleted: t.step_func(function (id, fullPath) {
             assert_unreached("oncompleted should not be reached");
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 48a448a44b28fac91d00c7258dac8b268a2915ae..8634b921186e991d7c9aa9791bec8abdbecebd6d 100644 (file)
@@ -22,14 +22,14 @@ Authors:
 <html>
 <head>
 <title>DownloadCallback_oncompleted</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadCallback_oncompleted
-//==== LABEL: Test whether the type of each argument is equal to the specified for oncompleted callback.
+//==== LABEL Test whether the type of each argument is equal to the specified for oncompleted callback.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadCallback:oncompleted M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,16 +37,16 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 
 setup({timeout: 90000});
-var t = async_test("DownloadCallback_oncompleted", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     downloadRequest, downloadId;
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_unreached("oncanceled should not be reached");
         }),
         oncompleted: t.step_func(function (id, fullPath) {
@@ -56,7 +56,7 @@ t.step(function () {
             assert_not_equals(fullPath, "", "fullPath is empty");
             t.done();
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index b475278f8f06e75012c99a3448bcc6a608f8ef4c..36c2078cd261734b15518a32b08964f6f944f2bd 100644 (file)
@@ -22,14 +22,14 @@ Authors:
 <html>
 <head>
 <title>DownloadCallback_onfailed</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadCallback_onfailed
-//==== LABEL: Test whether the type of each argument is equal to the specified for onfailed callback.
+//==== LABEL Test whether the type of each argument is equal to the specified for onfailed callback.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadCallback:onfailed M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 
 setup({timeout: 90000});
-var t = async_test("DownloadCallback_onfailed", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     downloadRequest, downloadId;
 t.step(function () {
     listener = {
@@ -47,10 +47,10 @@ t.step(function () {
         onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_unreached("oncanceled should not be reached");
         }),
-        oncompleted : t.step_func(function (id, fullPath) {
+        oncompleted: t.step_func(function (id, fullPath) {
             assert_unreached("oncompleted should not be reached");
         }),
         onfailed: t.step_func(function (id, err) {
index 7d64b21b58848f425e9121fffb7cee9af4bb45c3..c58dccce1cbdd26d37bf14c61145d2c362734f6f 100644 (file)
@@ -22,14 +22,14 @@ Authors:
 <html>
 <head>
 <title>DownloadCallback_onpaused</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadCallback_onpaused
-//==== LABEL: Test whether the type of each argument is equal to the specified for onpaused callback.
+//==== LABEL Test whether the type of each argument is equal to the specified for onpaused callback.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadCallback:onpaused M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 
 setup({timeout: 90000});
-var t = async_test("DownloadCallback_onpaused", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     downloadRequest, downloadId;
 t.step(function () {
     listener = {
@@ -52,13 +52,13 @@ t.step(function () {
                 tizen.download.cancel(downloadId);
             } catch (e) { }
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             t.done();
         }),
-        oncompleted : t.step_func(function (id, path) {
+        oncompleted: t.step_func(function (id, path) {
             assert_unreached("oncompleted should not be reached");
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 22a529e2a60cfc9aebe4a7d9b0bab6e076be2798..e04b437e387c50439820c4b8613a3641c9a9798b 100644 (file)
@@ -22,14 +22,14 @@ Authors:
 <html>
 <head>
 <title>DownloadCallback_onprogress</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadCallback_onprogress
-//==== LABEL: Test whether the type of each argument is equal to the specified for onprogress callback.
+//==== LABEL Test whether the type of each argument is equal to the specified for onprogress callback.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadCallback:onprogress M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA CBT CBOA
 
 setup({timeout: 90000});
-var t = async_test("DownloadCallback_onprogress", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     downloadRequest, downloadId;
 t.step(function () {
     listener = {
@@ -52,16 +52,16 @@ t.step(function () {
                 tizen.download.cancel(downloadId);
             } catch (e) { }
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             t.done();
         }),
-        oncompleted : t.step_func(function (id, path) {
+        oncompleted: t.step_func(function (id, path) {
             assert_unreached("oncompleted should not be reached");
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 6b95cecfc44313c1ec9b71cb44930a3ab7b27777..79c730b8cd38db439edd12cca38094d6dcf72974 100644 (file)
@@ -33,14 +33,14 @@ Authors:
 <html>
 <head>
 <title>DownloadManagerObject_download_exists</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script>
 //==== TEST: DownloadManagerObject_download_exists
-//==== LABEL check if the readonly attribute download
+//==== LABEL Check if the readonly attribute download
 //==== PRIORITY P3
 //==== SPEC Tizen Web API:Content:Download:DownloadManager:DownloadManager U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ test(function () {
     assert_true("download" in tizen, "DownloadManagerObject interface does not exist in Tizen object");
     check_readonly(tizen, "download", tizen.download, "object", "dummyValue");
     check_no_interface_object("DownloadManagerObject");
-}, "DownloadManagerObject_download_exists");
+}, document.title);
 
 </script>
 </body>
index ed148774d5313dbb8633a7258c8cd816f4d001c6..8ea5fe0484b5cd6c76cdd976817fb457cc005c37 100644 (file)
@@ -24,7 +24,7 @@ Authors:
 <html>
 <head>
 <title>DownloadManagerObject_notexist</title>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/unitcommon.js"></script>
 <script src="support/bluetooth_common.js"></script>
 </head>
 <body>
@@ -32,14 +32,14 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: DownloadManagerObject_notexist
-//==== LABEL check if is possible to call DownloadManagerObject in new expresion
+//==== LABEL Check if is possible to call DownloadManagerObject in new expresion
 //==== PRIORITY P3
 //==== SPEC: Tizen Web API:Content:Download:DownloadManagerObject:DownloadManagerObject U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== TEST_CRITERIA NIO
 test(function () {
     check_no_interface_object("DownloadManagerObject");
-}, "DownloadManagerObject_notexist");
+}, document.title);
 
 </script>
 </body>
index fc747ed78cf51a3bdf08fc592eff7193309c1d34..858120dc0a95cf60839cadc7128b3cc7815fee8a 100644 (file)
@@ -33,14 +33,14 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_cancel</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_cancel
-//==== LABEL: Check if cancel method with downloadId non-optional argument works
+//==== LABEL Check if cancel method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:cancel M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -48,29 +48,29 @@ Authors:
 //==== TEST_CRITERIA MMINA MAST MR
 
 setup({timeout: 90000});
-var t = async_test("DownloadManager_cancel", {timeout:90000}), downloadRequest = null,
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null,
     downloadId, listener, retValue = null;
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
             assert_not_equals(id, null, "id valid");
             try {
                 retValue = tizen.download.cancel(downloadId);
             } catch(e) { }
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_equals(tizen.download.getState(downloadId), "CANCELED", "DownloadId state is not 'CANCELED'");
             assert_equals(retValue, undefined, "oncanceled returns wrong value");
 
             t.done();
         }),
-        oncompleted : t.step_func(function (id, path) {
+        oncompleted: t.step_func(function (id, path) {
             assert_unreached("oncompleted should not be reached");
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index a2a218603c4e90100f5306a542fab9c641b3b69f..d1ed4f3b711bc42aaa98a187b05e399c5c91af5e 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_cancel_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_cancel_exist
-//==== LABEL: Check if cancel method exists in DownloadManager.
+//==== LABEL Check if cancel method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:cancel M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("cancel" in tizen.download, "cancel method not exists");
     check_method_exists(tizen.download, "cancel");
-}, "DownloadManager_cancel_exist");
+}, document.title);
 
 </script>
 </body>
index 65f8f39f6d87f649090291308fe9bef5f407bd57..66f5f8c51652e24bf5c21fc287fa9e5ea17de27b 100644 (file)
@@ -21,15 +21,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_extend</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script>
 //==== TEST: DownloadManager_extend
-//==== LABEL: test whether the DownloadManager object can have new attribute added
+//==== LABEL Test whether the DownloadManager object can have new attribute added
 //==== PRIORITY: P3
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:DownloadManager U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 
 test(function () {
     check_extensibility(tizen.download);
-}, "DownloadManager_extend");
+}, document.title);
 
 </script>
 </body>
index 620d31cf5b31b04665316b32e96543d6ba85f45c..71bb70109b9d44df7c5e84affad9717039e013ac 100644 (file)
@@ -33,44 +33,44 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getDownloadRequest</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getDownloadRequest
-//==== LABEL: Check if getDownloadRequest method with downloadId non-optional argument works
+//==== LABEL Check if getDownloadRequest method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:getDownloadRequest M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MR MMINA
 
-var t = async_test("DownloadManager_getDownloadRequest", {timeout:90000}),
+var t = async_test(document.title, {timeout: 90000}),
     destination = "documents", fileName = "download.html", downloadRequest,
     downloadId;
 setup({timeout: 90000});
 
 t.step(function () {
     var listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
 
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_unreached("oncanceled should not be reached");
         }),
-        oncompleted : t.step_func(function (id, fullPath) {
+        oncompleted: t.step_func(function (id, fullPath) {
             downloadRequest = tizen.download.getDownloadRequest(downloadId);
             assert_equals(downloadRequest.url, url_small, "url valu should not changed");
             assert_equals(downloadRequest.destination, destination, "destination value should not changed");
             assert_equals(downloadRequest.fileName, fileName, "fileName value should not changed");
             t.done();
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached");
         })
     };
index 0a9cc77da02206d0827ae6f679b5abf4f85d4e11..dc388372209015fbfd1d2b3cb8d230b09a0aa7f7 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getDownloadRequest_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getDownloadRequest_exist
-//==== LABEL: Check if getDownloadRequest method exists in DownloadManager.
+//==== LABEL Check if getDownloadRequest method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:getDownloadRequest M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("getDownloadRequest" in tizen.download, "getDownloadRequest method not exist");
     check_method_exists(tizen.download, "getDownloadRequest");
-}, "DownloadManager_getDownloadRequest_exist");
+}, document.title);
 
 </script>
 </body>
index 94790e21e4be420c5c65af9e97d9a94e4c7ff82d..9f52e6072d09d0c23678800959fa97564c6a0d5e 100644 (file)
@@ -33,41 +33,41 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getMIMEType</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getMIMEType
-//==== LABEL: Check if getMIMEType method with downloadId non-optional argument works
+//==== LABEL Check if getMIMEType method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:getMIMEType M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MMINA MR
 
-var t = async_test("DownloadManager_getMIMEType", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     MIMEtype, expectedMIMEtype, downloadRequest, downloadId;
 setup({timeout: 90000});
 
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_unreached("oncanceled should not be reached");
         }),
-        oncompleted : t.step_func(function (id, fullPath) {
+        oncompleted: t.step_func(function (id, fullPath) {
             expectedMIMEtype = "image/png";
             MIMEtype = tizen.download.getMIMEType(downloadId);
             assert_equals(MIMEtype, expectedMIMEtype, "different MIMEType value from expected");
             t.done();
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 4659442b8eefec5da4166780750e92053b36781a..5fbdb1d96bd551144a4c81d0ce1139014db71722 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getMIMEType_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getMIMEType_exist
-//==== LABEL: Check if getMIMEType method exists in DownloadManager.
+//==== LABEL Check if getMIMEType method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:getMIMEType M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("getMIMEType" in tizen.download, "getMIMEType method exists");
     check_method_exists(tizen.download, "getMIMEType");
-}, "DownloadManager_getMIMEType_exist");
+}, document.title);
 
 </script>
 </body>
index c1beee8c69e4a6c60e7a77e14d0632e47367360c..33b379c7777f7d0a2828032eb5daa21860dbcb38 100644 (file)
@@ -34,32 +34,32 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getState</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getState
-//==== LABEL: Check if getState method with downloadId non-optional argument works
+//==== LABEL Check if getState method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:getState M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MMINA MR
 
-var t = async_test("DownloadManager_getState", {timeout:90000}), downloadRequest = null,
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null,
     downloadId, listener, state;
 setup({timeout: 90000});
 
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_unreached("oncanceled should not be reached");
         }),
         oncompleted: t.step_func(function (id, fullPath) {
@@ -67,7 +67,7 @@ t.step(function () {
             assert_equals(state, "COMPLETED", "download state different from completed");
             t.done();
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 14c995fb0c83924c3812f9d3cfa9b5d1b6e0863d..a47b45233f1ed2d3aa87553133251216a2f05d80 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getState_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getState_exist
-//==== LABEL: Check if getState method exists in DownloadManager.
+//==== LABEL Check if getState method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:getState M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("getState" in tizen.download, "getState method exists");
     check_method_exists(tizen.download, "getState");
-}, "DownloadManager_getState_exist");
+}, document.title);
 
 </script>
 </body>
index ea5b82c0a39565fa2771b8b52c20830395ad10b6..31c24be4a5026b23aa61c3d09ff37b4568fb9940 100644 (file)
@@ -33,40 +33,40 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_getState_using</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_getState_using
-//==== LABEL check if the method getState which is in DownloadManager interface returns proper value
+//==== LABEL Check if the method getState which is in DownloadManager interface returns proper value
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Content:Download:DownloadManager:getState M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== TEST_CRITERIA MMINA MR
 
-var t = async_test("DownloadManager_getState_using", {timeout:90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadId = null, DownloadRequest = null, listener, state;
 setup({timeout: 90000});
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
             state = tizen.download.getState(downloadId);
             assert_true(state === "DOWNLOADING" || state === "COMPLETED",
                 "The state is not DOWNLOADING nor COMPLETED");
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
         }),
-        oncompleted : t.step_func(function (id, fullPath) {
+        oncompleted: t.step_func(function (id, fullPath) {
             assert_true(state === "DOWNLOADING" || state === "COMPLETED",
                 "The state is not DOWNLOADING nor COMPLETED");
             t.done();
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached");
         })
     };
index dbe0b9ed80e760df00bf7e957b821b9d39bdce7a..e98f0f635d5435a4338d5e11eaff5c5c11d20066 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_in_tizen</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_in_tizen
-//==== LABEL: check download attribute
+//==== LABEL Check download attribute
 //==== PRIORITY: P3
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:DownloadManager U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -38,7 +38,7 @@ Authors:
 
 test(function () {
     check_readonly(tizen, "download", tizen.download, "object", "Tizen");
-}, "DownloadManager_in_tizen");
+}, document.title);
 
 </script>
 </body>
index ef22e2b042cd20ecdeaa2a9cbf18f1d87dac4729..dabcabefe7e949cb7fb8934a13f6f95784a2a6bf 100644 (file)
@@ -22,22 +22,22 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_notexist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script>
 //==== TEST: DownloadManager_notexist
-//==== LABEL: check if is possible to call DownloadManager in new expresion
+//==== LABEL Check if is possible to call DownloadManager in new expresion
 //==== PRIORITY: P3
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:DownloadManager U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== TEST_CRITERIA NIO
 test(function () {
     check_no_interface_object("DownloadManager");
-}, "DownloadManager_notexist");
+}, document.title);
 
 </script>
 </body>
index 7749568610acd4c4a7a530094acdbea27482197e..32488eedba1cdb8a3b77837c1fdb627bcb273847 100644 (file)
@@ -34,47 +34,47 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_pause</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_pause
-//==== LABEL: Check if pause method with downloadId non-optional argument works
+//==== LABEL Check if pause method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:pause M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MMINA MAST MR
 
-var t = async_test("DownloadManager_pause", {timeout:90000}), downloadRequest = null,
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null,
     downloadId, listener, retValue = null;
 setup({timeout: 90000});
 
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
             assert_not_equals(id, null, "id should not be null");
             try {
                 retValue = tizen.download.pause(downloadId);
             } catch (e) { }
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_equals(tizen.download.getState(downloadId), "PAUSED", "DownloadId not paused");
             try {
                 tizen.download.cancel(downloadId);
             } catch (e) { }
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_equals(retValue, undefined, "pause returns wrong value");
             t.done();
         }),
-        oncompleted : t.step_func(function (id, path) {
+        oncompleted: t.step_func(function (id, path) {
             assert_unreached("oncompleted should not be reached");
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 5676d9100c09c567d135e42ee82b306059acc733..97225bab9fd873b3b1378b1c18262f8090e5ba32 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_pause_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_pause_exist
-//==== LABEL: Check if pause method exists in DownloadManager.
+//==== LABEL Check if pause method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC Tizen Web API:Content:Download:DownloadManager:pause M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("pause" in tizen.download, "pause method not exist");
     check_method_exists(tizen.download, "pause");
-}, "DownloadManager_pause_exist");
+}, document.title);
 
 </script>
 </body>
index 7b5bc8d4ef4748e35f44da9b33a110eed2b46a95..a51c17c01e92fad50bfe196b255a0fa2e8dc13fe 100644 (file)
@@ -34,22 +34,22 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_resume</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_resume
-//==== LABEL: Check if resume method with downloadId non-optional argument works
+//==== LABEL Check if resume method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:resume M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MMINA MAST MR
 
-var t = async_test("DownloadManager_resume", {timeout:90000}), downloadRequest = null,
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null,
     downloadId, listener, flag = true, retValue = null;
 setup({timeout: 90000});
 t.step(function () {
@@ -68,14 +68,14 @@ t.step(function () {
         onpaused: t.step_func(function (id) {
             retValue = tizen.download.resume(downloadId);
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_equals(retValue, undefined, "resume returns wrong value");
             t.done();
         }),
-        oncompleted : t.step_func(function (id, path) {
+        oncompleted: t.step_func(function (id, path) {
             assert_unreached("oncompleted should not be reached");
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index 96b0a5e0e85b5441f07775ef369bf8861d30d466..276b5a6cd787cdaf0c72b1178c250fd14b6c34e8 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_resume_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_resume_exist
-//==== LABEL: Check if resume method exists in DownloadManager.
+//==== LABEL Check if resume method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:resume M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("resume" in tizen.download, "resume method not exist");
     check_method_exists(tizen.download, "resume");
-}, "DownloadManager_resume_exist");
+}, document.title);
 
 </script>
 </body>
index 6af65237ea798fcce73f100ecc105e4cc03e1c3d..5ce7f1cf7b83745ecdcf7fe2504ea8a7bff9792e 100644 (file)
@@ -33,38 +33,38 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_setListener</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_setListener
-//==== LABEL: Check if setListener method with downloadId non-optional argument works
+//==== LABEL Check if setListener method with downloadId non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:setListener M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== ONLOAD_DELAY 90
 //==== TEST_CRITERIA MMINA MAST MR
-var t = async_test("DownloadManager_setListener", {timeout:90000}), listener,
+var t = async_test(document.title, {timeout: 90000}), listener,
     downloadRequest, downloadId, retValue = null;
 setup({timeout: 90000});
 t.step(function () {
     listener = {
-        onprogress : t.step_func(function (id, receivedSize, totalSize) {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
         }),
-        onpaused : t.step_func(function (id) {
+        onpaused: t.step_func(function (id) {
             assert_unreached("onpaused should not be reached");
         }),
-        oncanceled : t.step_func(function (id) {
+        oncanceled: t.step_func(function (id) {
             assert_unreached("oncanceled should not be reached");
         }),
-        oncompleted : t.step_func(function (id, fullPath) {
+        oncompleted: t.step_func(function (id, fullPath) {
             assert_equals(retValue, undefined, "setListener returns wrong value");
             t.done();
         }),
-        onfailed : t.step_func(function (id, error) {
+        onfailed: t.step_func(function (id, error) {
             assert_unreached("onfailed should not be reached:: name: " + error.name + ", msg: " + error.message);
         })
     };
index fa285684484e41256c1dbb289ea6c580375879d7..e96ca839e567757e42911b17052b851e07f02ec4 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_setListener_downloadCallback_TypeMismatch</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_setListener_downloadCallback_TypeMismatch
-//==== LABEL: Check argument downloadCallback conversions exception for setListener method.
+//==== LABEL Check argument downloadCallback conversions exception for setListener method.
 //==== PRIORITY: P2
 //==== ONLOAD_DELAY 90
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:setListener M
@@ -39,7 +39,7 @@ Authors:
 
 setup({timeout: 90000});
 
-var t = async_test("DownloadManager_setListener_downloadCallback_TypeMismatch", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadRequest, downloadId, listener, exceptionName, conversionTable, i;
 t.step(function () {
     downloadRequest = new tizen.DownloadRequest(url_small, "documents");
@@ -49,7 +49,7 @@ t.step(function () {
         listener = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.download.setListener(downloadId, listener);
             }, exceptionName + " should be thrown - given incorrect listener.");
index fa69bcc47e7f07cd8e02c344f33437f3ce042400..b378e39f755fda9505cff36dc5851906f95695fd 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_setListener_downloadCallback_invalid_cb</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_setListener_downloadCallback_invalid_cb
-//==== LABEL: Check if setListener method throws exception when giving invalid listener.
+//==== LABEL Check if setListener method throws exception when giving invalid listener.
 //==== PRIORITY: P2
 //==== ONLOAD_DELAY 90
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:setListener M
@@ -39,7 +39,7 @@ Authors:
 
 setup({timeout: 90000});
 
-var t = async_test("DownloadManager_setListener_downloadCallback_invalid_cb", {timeout:90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadRequest, downloadId, incorrectListeners, exceptionName, i, listener;
 t.step(function () {
     incorrectListeners = getListenerConversionExceptions(["onprogress",
@@ -50,7 +50,7 @@ t.step(function () {
         listener  = incorrectListeners[i][0];
         exceptionName = incorrectListeners[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.download.setListener(downloadId, listener);
             }, exceptionName + " should be thrown - given incorrect listener.");
index e2651bee4c1286dd242af6d159a30ca197065115..5acdc1d18179da181e4aa17e91ee462a4bfb5aeb 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_setListener_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_setListener_exist
-//==== LABEL: Check if setListener method exists in DownloadManager.
+//==== LABEL Check if setListener method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:setListener M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -49,7 +49,7 @@ Authors:
 test(function () {
     assert_true("setListener" in tizen.download, "setListener method not exist");
     check_method_exists(tizen.download, "setListener");
-}, "DownloadManager_setListener_exist");
+}, document.title);
 
 </script>
 </body>
index 98e4f44c4fc37c5c32120171d1798766b5fa9744..1d4484083c3d8eab8b25007bfae4ffd5f6d1d5aa 100644 (file)
@@ -22,25 +22,25 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_setListener_missarg</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_setListener_missarg
-//==== LABEL: Check if setListener method with missing non-optional argument throws exception
+//==== LABEL Check if setListener method with missing non-optional argument throws exception
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:setListener M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== TEST_CRITERIA MMA
 test(function () {
-    assert_throws({name: TYPE_MISMATCH_ERR},
+    assert_throws(TYPE_MISMATCH_EXCEPTION,
         function () {
             tizen.download.setListener();
         }, TYPE_MISMATCH_ERR + " exception should be thrown (given no nonoptional arguments).");
-}, "DownloadManager_setListener_missarg");
+}, document.title);
 
 </script>
 </body>
index abe5ed2650a4b12504f839b8b7533b2415b2dd10..afa45e7f1b000c44e066b035f2f510b9db059cba 100644 (file)
@@ -32,8 +32,7 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_setListener_null</title>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
+<script type="text/javascript" src="support/unitcommon.js"></script>
 </head>
 <body>
 <div id="log"></div>
@@ -46,11 +45,11 @@ Authors:
 //==== TEST_CRITERIA MC
 
 test(function () {
-    assert_throws({name: "TypeMismatchError"},
+    assert_throws(TYPE_MISMATCH_EXCEPTION,
         function () {
             tizen.download.setListener(null, null);
         }, "TypeMismatchError exception should be thrown (given null arguments).");
-}, "DownloadManager_setListener_null");
+}, document.title);
 
 </script>
 </body>
index bbda495d0527059b775df36e81001d2b40201877..3caa0a1299ff175908ced63b4d1f3c5e0c7fa4d6 100644 (file)
@@ -22,14 +22,14 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start
-//==== LABEL: Check if start method with downloadRequest non-optional argument works
+//==== LABEL Check if start method with downloadRequest non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -44,7 +44,7 @@ test(function () {
     assert_equals(DownloadRequest.url, url_small, "url should not change");
     assert_equals(DownloadRequest.destination, destination, "destination should not change");
     tizen.download.cancel(downloadId);
-}, "DownloadManager_start");
+}, document.title);
 
 </script>
 </body>
index 719fc487c7f45cb16050dae5b2914e8b5e8fa3c7..1d51faad82555b0a83ff0e89e7b625ca29a326e4 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_downloadCallback_TypeMismatch</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_downloadCallback_TypeMismatch
-//==== LABEL: Check argument downloadCallback conversions exception for start method.
+//==== LABEL Check argument downloadCallback conversions exception for start method.
 //==== PRIORITY: P2
 //==== ONLOAD_DELAY 90
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
@@ -40,7 +40,7 @@ Authors:
 //  DownloadManager_start_downloadCallback_TypeMismatch for start method.
 setup({timeout: 90000});
 
-var t = async_test("DownloadManager_start_downloadCallback_TypeMismatch", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadRequest, listener, exceptionName, conversionTable, i;
 t.step(function () {
     downloadRequest = new tizen.DownloadRequest(url_small, "documents");
@@ -49,7 +49,7 @@ t.step(function () {
         listener = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.download.start(downloadRequest, listener);
             }, exceptionName + " should be thrown - given incorrect listener.");
index 0f7256dcb9b910ee67b9028dfa68244afeee13e4..a1de2bceb0f4a5ab0cdba9020a70bea064db2670 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_downloadCallback_invalid_cb</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_downloadCallback_invalid_cb
-//==== LABEL: Check if start method throws exception when giving invalid listener.
+//==== LABEL Check if start method throws exception when giving invalid listener.
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MTL
 
 setup({timeout: 90000});
-var t = async_test("DownloadManager_start_downloadCallback_invalid_cb", {timeout:90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadRequest, incorrectListeners, exceptionName, i, listener;
 t.step(function () {
     incorrectListeners = getListenerConversionExceptions(["onprogress",
@@ -48,7 +48,7 @@ t.step(function () {
         listener  = incorrectListeners[i][0];
         exceptionName = incorrectListeners[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.download.start(downloadRequest, listener);
             }, exceptionName + " should be thrown - given incorrect listener.");
index c08149b9293c60365944f9583f9be938965601ee..d7a78295884a6597d3cfe13970389b49a05e1648 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_downloadRequest_TypeMismatch</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_downloadRequest_TypeMismatch
-//==== LABEL: Check argument downloadRequest conversions exception.
+//==== LABEL Check argument downloadRequest conversions exception.
 //==== PRIORITY: P2
 //==== ONLOAD_DELAY 90
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
@@ -39,7 +39,7 @@ Authors:
 
 setup({timeout: 90000});
 
-var t = async_test("DownloadManager_start_downloadRequest_TypeMismatch", {timeout: 90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadRequest, exceptionName, conversionTable, i;
 t.step(function () {
     conversionTable = getTypeConversionExceptions("object", false);
@@ -47,7 +47,7 @@ t.step(function () {
         downloadRequest = conversionTable[i][0];
         exceptionName = conversionTable[i][1];
 
-        assert_throws({name : exceptionName},
+        assert_throws({name: exceptionName},
             function () {
                 tizen.download.start(downloadRequest);
             }, exceptionName + " should be thrown - given incorrect downloadRequest.");
index 7d729e482de4ab109bbac9b3379a297e56d8efda..819d094ee3a2b6e9c9d126032697b461d8f00b9d 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_downloadRequest_invalid_obj</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_downloadRequest_invalid_obj
-//==== LABEL: check if giving incorrect downloadRequest for setListener method throws exception
+//==== LABEL Check if giving incorrect downloadRequest for setListener method throws exception
 //==== PRIORITY: P2
 //==== ONLOAD_DELAY 90
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
@@ -39,14 +39,14 @@ Authors:
 
 setup({timeout: 90000});
 
-var t = async_test("DownloadManager_start_downloadRequest_invalid_obj", {timeout:90000}),
+var t = async_test(document.title, {timeout: 90000}),
     downloadRequest, exceptionName = "TypeMismatchError";
 t.step(function () {
     downloadRequest = [];
     downloadRequest[0] = {url: url_small, destination: "documents",
         fileName: "file_name.png"};
 
-    assert_throws({name : exceptionName},
+    assert_throws({name: exceptionName},
         function () {
             tizen.download.start(downloadRequest[0]);
         }, exceptionName + " should be thrown - given incorrect downloadRequest.");
index a3aefa4685aedd354becab002e57921643d23a44..2385364f4fc33b91b03ded7d600098fedfc080d7 100644 (file)
@@ -33,15 +33,15 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_exist
-//==== LABEL: Check if start method exists in DownloadManager.
+//==== LABEL Check if start method exists in DownloadManager.
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -50,7 +50,7 @@ Authors:
 test(function () {
     assert_true("start" in tizen.download, "start method not exist");
     check_method_exists(tizen.download, "start");
-}, "DownloadManager_start_exist");
+}, document.title);
 
 </script>
 </body>
index 510c780a931cb2859a16d8c8d715f48a450f14db..1a6bd70fa40ac7951c2db3160dc665ac6186ff36 100644 (file)
@@ -22,26 +22,26 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_missarg</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_missarg
-//==== LABEL: Check if start method with missing non-optional argument works
+//==== LABEL Check if start method with missing non-optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== TEST_CRITERIA MMA
 
 test(function () {
-    assert_throws({name: TYPE_MISMATCH_ERR},
+    assert_throws(TYPE_MISMATCH_EXCEPTION,
         function () {
             tizen.download.start();
         }, TYPE_MISMATCH_ERR + " exception should be thrown (given no non-optional arguments).");
-}, "DownloadManager_start_missarg");
+}, document.title);
 
 </script>
 </body>
index d7b922f13bca8ab31fe5c7d1e8990d7cedda09c0..f7086a7905ab4f68320d1e4ddcd5e12f54ddffb9 100644 (file)
@@ -34,14 +34,14 @@ Authors:
 <html>
 <head>
 <title>DownloadManager_start_with_downloadCallback</title>
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadManager_start_with_downloadCallback
-//==== LABEL: Check if start method with downloadCallback optional argument works
+//==== LABEL Check if start method with downloadCallback optional argument works
 //==== PRIORITY: P2
 //==== SPEC: Tizen Web API:Content:Download:DownloadManager:start M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -49,7 +49,7 @@ Authors:
 //==== TEST_CRITERIA MOA MAST
 
 setup({timeout: 90000});
-var t = async_test("DownloadManager_start_with_downloadCallback", {timeout:90000}),
+var t = async_test(document.title, {timeout: 90000}),
     listener, destination = "documents", DownloadRequest;
 t.step(function () {
     listener = {
index 735efb123e7d74163ac8cfc726b3ff49eee9c5c8..d3531e0f6313597bcb52595e5705dfc077b6c01a 100644 (file)
@@ -26,8 +26,8 @@ Authors:
 <head>
 <title>DownloadManager_start_with_extra_argument</title>
 <meta charset="utf-8">
-<script src="../resources/unitcommon.js"></script>
-<script src="support/downloadcommon.js"></script>
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
 </head>
 
 <body>
@@ -35,7 +35,7 @@ Authors:
 <script type="text/javascript">
 
 //==== TEST: DownloadManager_start_with_extra_argument
-//==== LABEL check whether 'start' method returns correct value when extra argument is given
+//==== LABEL Check whether 'start' method returns correct value when extra argument is given
 //==== SPEC Tizen Web API:Content:Download:DownloadManager:start M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
 //==== TEST_CRITERIA MOA MR
@@ -60,7 +60,7 @@ test(function () {
         assert_less_than_equal(downloadId, 2147483647, "downloadId is not in range - upper limit");
     }
 
-}, "DownloadManager_start_with_extra_argument");
+}, document.title);
 
 </script>
 </body>
index 1e8596a1e9a1e33729755da8d798c2cca3c6a83f..e0de4c7dcb1a6add483221a52072953645928b54 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_constructor</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadRequest_constructor
-//==== LABEL: check if the values of the attributes are equal to the arguments passed
+//==== LABEL Check if the values of the attributes are equal to the arguments passed
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:constructor C
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -43,7 +43,7 @@ test(function (){
     assert_equals(downloadRequest.url, url_small, "url should not change");
     assert_equals(downloadRequest.destination, destination, "destination should not change");
     assert_equals(downloadRequest.fileName, fileName, "fileName should not change");
-}, "DownloadRequest_constructor");
+}, document.title);
 
 </script>
 </body>
index 4c28d82d1a40fdbd2b6466c0e4b6fddc08878cd8..96b36f8426228ed996fe1c8db621602f2a3a8438 100644 (file)
@@ -23,15 +23,15 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_destination_attribute</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script>
 //==== TEST: DownloadRequest_destination_attribute
-//==== LABEL: check attribute destination
+//==== LABEL Check attribute destination
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:destination A
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -40,10 +40,10 @@ Authors:
 var downloadRequest = null, default_val = "";
 test(function () {
     downloadRequest = new tizen.DownloadRequest(url_small);
-    assert_true("destination" in downloadRequest,"destination not in downloadRequest");
+    assert_true("destination" in downloadRequest, "destination not in downloadRequest");
     assert_equals(downloadRequest.destination, default_val, "Default value is incorrect");
     check_attribute(downloadRequest, "destination", default_val, "string", "documents");
-}, "DownloadRequest_destination_attribute");
+}, document.title);
 
 </script>
 </body>
index 24d969fd15c44dd70a4b65f65fa174052b9f75a0..69f3adb74369b73f3ac2f824afdfe19bf3999c93 100644 (file)
@@ -22,15 +22,15 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_exist</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script type="text/javascript">
 //==== TEST: DownloadRequest_exist
-//==== LABEL: Test whether the constructor of the interface is defined or not for DownloadRequest.
+//==== LABEL Test whether the constructor of the interface is defined or not for DownloadRequest.
 //==== PRIORITY: P0
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:constructor C
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -38,7 +38,7 @@ Authors:
 
 test(function () {
     check_constructor("DownloadRequest");
-}, "DownloadRequest_exist");
+}, document.title);
 
 </script>
 </body>
index e313be5dbf3dd253f3410f155a46713ef6ca2a5f..0c441032c9133519223c0af582234b73e7c9b13f 100644 (file)
@@ -21,15 +21,15 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_extend</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
 <div id="log"></div>
 <script>
 //==== TEST: DownloadRequest_extend
-//==== LABEL: test whether the object can have new attribute added
+//==== LABEL Test whether the object can have new attribute added
 //==== PRIORITY: P3
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:DownloadRequest U
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -38,7 +38,7 @@ var downloadRequest = null;
 test(function () {
     downloadRequest = new tizen.DownloadRequest(url_small, "downloads", "file_name.html");
     check_extensibility(downloadRequest);
-}, "DownloadRequest_extend");
+}, document.title);
 
 </script>
 </body>
index b36d6823f1af30b114c30f0bfced7e1a0a974087..e4f78cb4d3fb2d65b22ba672ff2be22b70407aa8 100644 (file)
@@ -21,8 +21,8 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_fileName_attribute</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 
@@ -30,7 +30,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: DownloadRequest_fileName_attribute
-//==== LABEL: check fileName attribute
+//==== LABEL Check fileName attribute
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:fileName A
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -39,10 +39,10 @@ Authors:
 var downloadRequest = null, default_val = "";
 test(function () {
     downloadRequest = new tizen.DownloadRequest(url_small, "documents");
-    assert_true("fileName" in downloadRequest,"fileName is not in downloadRequest");
+    assert_true("fileName" in downloadRequest, "fileName is not in downloadRequest");
     assert_equals(downloadRequest.fileName, default_val, "fileName should not change");
     check_attribute(downloadRequest, "fileName", default_val, "string", "file_name.html");
-}, "DownloadRequest_fileName_attribute");
+}, document.title);
 
 </script>
 </body>
index 47bf53ae83211e9a5c09d606f44169b0107492ba..04907ebd18e7ff1c28bea3251e0d187d5e3b672c 100644 (file)
@@ -21,14 +21,14 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_httpHeader_attribute</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script>
 //==== TEST: DownloadRequest_httpHeader_attribute
-//==== LABEL: check httpHeader attribute
+//==== LABEL Check httpHeader attribute
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:httpHeader A
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 var downloadRequest = null;
 test(function () {
     downloadRequest = new tizen.DownloadRequest(url_small, "documents", "file_name.html");
-    assert_true("httpHeader" in downloadRequest,"httpHeader not in downloadRequest");
+    assert_true("httpHeader" in downloadRequest, "httpHeader not in downloadRequest");
     assert_type(downloadRequest.httpHeader, "object", "Type is incorrect");
     assert_equals(Object.getOwnPropertyNames(downloadRequest.httpHeader).length, 0,
         "httpHeader should be an empty object but has properties");
@@ -45,7 +45,7 @@ test(function () {
     assert_equals(downloadRequest.httpHeader.Pragma, "no-cache", "Value is incorrect");
     downloadRequest.httpHeader.Pragma = null;
     assert_equals(downloadRequest.httpHeader.Pragma, null, "Value is incorrect");
-}, "DownloadRequest_httpHeader_attribute");
+}, document.title);
 
 </script>
 </body>
index 64b0e02cdcf0f452b5dc8ba895b660ce3f28f498..4810e3c6e65c1759881adc91b5f9ad6a586886b1 100644 (file)
@@ -21,14 +21,14 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_networkType_attribute</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script>
 //==== TEST: DownloadRequest_networkType_attribute
-//==== LABEL: check networkType attribute
+//==== LABEL Check networkType attribute
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:networkType A
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,7 +37,7 @@ Authors:
 var downloadRequest = null;
 test(function () {
     downloadRequest = new tizen.DownloadRequest(url_small, "documents", "file_name.html");
-    assert_true("networkType" in downloadRequest,"networkType not in downloadRequest");
+    assert_true("networkType" in downloadRequest, "networkType not in downloadRequest");
     assert_equals(downloadRequest.networkType, "ALL", "Default value is incorrect");
     downloadRequest.networkType = "WIFI";
     assert_equals(downloadRequest.networkType, "WIFI", "Value is incorrect");
@@ -45,7 +45,7 @@ test(function () {
     assert_equals(downloadRequest.networkType, null, "Value is incorrect");
     downloadRequest.networkType = "TIZEN";
     assert_equals(downloadRequest.networkType, null, "Value is incorrect");
-});
+}, document.title);
 
 </script>
 </body>
index 72fdc787b6da8455f2f673baa511bb33f304921b..d67a936069957a7962ed4417481f670d5c0308c5 100644 (file)
@@ -21,14 +21,14 @@ Authors:
 <html>
 <head>
 <title>DownloadRequest_url_attribute</title>
-<script src="support/downloadcommon.js"></script>
-<script src="../resources/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+<script src="support/unitcommon.js"></script>
 </head>
 <body>
 <div id="log"></div>
 <script>
 //==== TEST: DownloadRequest_url_attribute
-//==== LABEL: check url attribute
+//==== LABEL Check url attribute
 //==== PRIORITY: P1
 //==== SPEC: Tizen Web API:Content:Download:DownloadRequest:url A
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
@@ -37,13 +37,13 @@ Authors:
 var downloadRequest = null, default_val = null;
 test(function () {
     downloadRequest = new tizen.DownloadRequest(url_small);
-    assert_true("url" in downloadRequest,"url not in downloadRequest");
+    assert_true("url" in downloadRequest, "url not in downloadRequest");
     default_val = url_small;
     assert_equals(downloadRequest.url, default_val, "Default value is incorrect");
     check_attribute(downloadRequest, "url", default_val, "string", "http://www.samsung.com/");
     downloadRequest.url = null;
     assert_not_equals(downloadRequest.url, null, "url should not be set to null");
-}, "DownloadRequest_url_attribute");
+}, document.title);
 
 </script>
 </body>
diff --git a/tct-download-tizen-tests/download/support/download_common.js b/tct-download-tizen-tests/download/support/download_common.js
new file mode 100644 (file)
index 0000000..15ff3b4
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+
+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:
+
+*/
+
+function assert_type_if_valid(obj, type, msg) {
+    if(obj !== undefined) {
+        if(obj !== null) {
+            assert_equals(typeof(obj), type, msg);
+            return;
+        }
+    }
+}
+
+var TYPE_MISMATCH_ERR = 'TypeMismatchError';
+var INVALID_VALUES_ERR = 'InvalidValuesError';
+var NOT_SUPPORTED_ERR = 'NotSupportedError';
+var NOT_FOUND_ERR = 'NotFoundError';
+
+var url_large = "http://download.tizen.org/tct/2_1/webapi-tizen-download-test-image-hq.png";
+var url_small = "http://download.tizen.org/tct/2_1/webapi-tizen-download-test-image-lq.png";
+var url_broken = "http://download.tizen.org/tct/2_1/broken_file";
diff --git a/tct-download-tizen-tests/download/support/downloadcommon.js b/tct-download-tizen-tests/download/support/downloadcommon.js
deleted file mode 100644 (file)
index 15ff3b4..0000000
+++ /dev/null
@@ -1,39 +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:
-
-*/
-
-function assert_type_if_valid(obj, type, msg) {
-    if(obj !== undefined) {
-        if(obj !== null) {
-            assert_equals(typeof(obj), type, msg);
-            return;
-        }
-    }
-}
-
-var TYPE_MISMATCH_ERR = 'TypeMismatchError';
-var INVALID_VALUES_ERR = 'InvalidValuesError';
-var NOT_SUPPORTED_ERR = 'NotSupportedError';
-var NOT_FOUND_ERR = 'NotFoundError';
-
-var url_large = "http://download.tizen.org/tct/2_1/webapi-tizen-download-test-image-hq.png";
-var url_small = "http://download.tizen.org/tct/2_1/webapi-tizen-download-test-image-lq.png";
-var url_broken = "http://download.tizen.org/tct/2_1/broken_file";
diff --git a/tct-download-tizen-tests/download/support/unitcommon.js b/tct-download-tizen-tests/download/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-download-tizen-tests/resources/unitcommon.js b/tct-download-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 91b928dad2117482c13fe0c9b3c6ee922ad7faf5..00ad93aa37c0b806b3b38b2e81ab23a60ad24501 100644 (file)
@@ -63,7 +63,7 @@
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if the method getState which is in DownloadManager interface returns proper value" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_using">
+      <testcase purpose="Check if the method getState which is in DownloadManager interface returns proper value" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_using">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_using.html</test_script_entry>
         </description>
@@ -87,7 +87,7 @@
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check attribute destination" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_destination_attribute">
+      <testcase purpose="Check attribute destination" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_destination_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_destination_attribute.html</test_script_entry>
         </description>
@@ -99,7 +99,7 @@
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check fileName attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_fileName_attribute">
+      <testcase purpose="Check fileName attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_fileName_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_fileName_attribute.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if the readonly attribute download" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManagerObject_download_exists">
+      <testcase purpose="Check if the readonly attribute download" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManagerObject_download_exists">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManagerObject_download_exists.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check url attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_url_attribute">
+      <testcase purpose="Check url attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_url_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_url_attribute.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check whether 'start' method returns correct value when extra argument is given" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_start_with_extra_argument">
+      <testcase purpose="Check whether 'start' method returns correct value when extra argument is given" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_start_with_extra_argument">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start_with_extra_argument.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="test whether the object can have new attribute added" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadRequest_extend">
+      <testcase purpose="Test whether the object can have new attribute added" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadRequest_extend">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_extend.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if the values of the attributes are equal to the arguments passed" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_constructor">
+      <testcase purpose="Check if the values of the attributes are equal to the arguments passed" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_constructor">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_constructor.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="test whether the DownloadManager object can have new attribute added" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManager_extend">
+      <testcase purpose="Test whether the DownloadManager object can have new attribute added" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManager_extend">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_extend.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if is possible to call DownloadCallback in new expresion" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadCallback_notexist">
+      <testcase purpose="Check if is possible to call DownloadCallback in new expresion" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadCallback_notexist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadCallback_notexist.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if is possible to call DownloadManager in new expresion" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManager_notexist">
+      <testcase purpose="Check if is possible to call DownloadManager in new expresion" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManager_notexist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_notexist.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check download attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManager_in_tizen">
+      <testcase purpose="Check download attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManager_in_tizen">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_in_tizen.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if giving incorrect downloadRequest for setListener method throws exception" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_start_downloadRequest_invalid_obj">
+      <testcase purpose="Check if giving incorrect downloadRequest for setListener method throws exception" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_start_downloadRequest_invalid_obj">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start_downloadRequest_invalid_obj.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check networkType attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_networkType_attribute">
+      <testcase purpose="Check networkType attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_networkType_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_networkType_attribute.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check httpHeader attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_httpHeader_attribute">
+      <testcase purpose="Check httpHeader attribute" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P1" id="DownloadRequest_httpHeader_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_httpHeader_attribute.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="check if is possible to call DownloadManagerObject in new expresion" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManagerObject_notexist">
+      <testcase purpose="Check if is possible to call DownloadManagerObject in new expresion" type="compliance" status="approved" component="TizenAPI/Content/Download" execution_type="auto" priority="P3" id="DownloadManagerObject_notexist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManagerObject_notexist.html</test_script_entry>
         </description>
index 82aeb96daeaacfbd91d490eee323def2f5940874..26f743463135a7dcce05d4adcbec32b6337dd3e2 100644 (file)
@@ -28,7 +28,7 @@
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_exist.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if the method getState which is in DownloadManager interface returns proper value" onload_delay="90" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_getState_using">
+      <testcase purpose="Check if the method getState which is in DownloadManager interface returns proper value" onload_delay="90" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_getState_using">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_using.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadCallback_onprogress.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check attribute destination" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_destination_attribute">
+      <testcase purpose="Check attribute destination" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_destination_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_destination_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check fileName attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_fileName_attribute">
+      <testcase purpose="Check fileName attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_fileName_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_fileName_attribute.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if the readonly attribute download" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManagerObject_download_exists">
+      <testcase purpose="Check if the readonly attribute download" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManagerObject_download_exists">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManagerObject_download_exists.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check url attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_url_attribute">
+      <testcase purpose="Check url attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_url_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_url_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check whether 'start' method returns correct value when extra argument is given" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_start_with_extra_argument">
+      <testcase purpose="Check whether 'start' method returns correct value when extra argument is given" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_start_with_extra_argument">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start_with_extra_argument.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_setListener_null.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="test whether the object can have new attribute added" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_extend">
+      <testcase purpose="Test whether the object can have new attribute added" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_extend">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_extend.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if the values of the attributes are equal to the arguments passed" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_constructor">
+      <testcase purpose="Check if the values of the attributes are equal to the arguments passed" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_constructor">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_constructor.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start_missarg.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="test whether the DownloadManager object can have new attribute added" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_extend">
+      <testcase purpose="Test whether the DownloadManager object can have new attribute added" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_extend">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_extend.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if is possible to call DownloadCallback in new expresion" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadCallback_notexist">
+      <testcase purpose="Check if is possible to call DownloadCallback in new expresion" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadCallback_notexist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadCallback_notexist.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if is possible to call DownloadManager in new expresion" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_notexist">
+      <testcase purpose="Check if is possible to call DownloadManager in new expresion" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_notexist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_notexist.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check download attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_in_tizen">
+      <testcase purpose="Check download attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_in_tizen">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_in_tizen.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start_downloadCallback_invalid_cb.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if giving incorrect downloadRequest for setListener method throws exception" onload_delay="90" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_start_downloadRequest_invalid_obj">
+      <testcase purpose="Check if giving incorrect downloadRequest for setListener method throws exception" onload_delay="90" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManager_start_downloadRequest_invalid_obj">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start_downloadRequest_invalid_obj.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadCallback_onfailed.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check networkType attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_networkType_attribute">
+      <testcase purpose="Check networkType attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_networkType_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_networkType_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check httpHeader attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_httpHeader_attribute">
+      <testcase purpose="Check httpHeader attribute" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadRequest_httpHeader_attribute">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadRequest_httpHeader_attribute.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="check if is possible to call DownloadManagerObject in new expresion" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManagerObject_notexist">
+      <testcase purpose="Check if is possible to call DownloadManagerObject in new expresion" component="TizenAPI/Content/Download" execution_type="auto" id="DownloadManagerObject_notexist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManagerObject_notexist.html</test_script_entry>
         </description>