[common][download][TWDAPI-222, Download module resume function and exceptions correction] 18/214318/2
authorqunfang.lin <qunfang.lin@samsung.com>
Fri, 20 Sep 2019 23:47:41 +0000 (07:47 +0800)
committerqunfang.lin <qunfang.lin@samsung.com>
Wed, 25 Sep 2019 02:09:38 +0000 (10:09 +0800)
Unit test platform: TM1
Unit test result summary: Total 8, Pass 8, Fail 0, Block 0
Fail reason: Download the latest binary tizen-unified_20190923.1_mobile-wayland
             and all 8 TCs can pass now.

Change-Id: Icbfa3f72d4b993c7e9706d98ad2dd19e5abc83d7
Signed-off-by: qunfang.lin <qunfang.lin@samsung.com>
common/tct-download-tizen-tests/download/DownloadManager_abandon.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_abandon_InvalidValuesError.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_abandon_exist.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_abandon_misarg.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_cancel_InvalidValuesError.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_ABANDONED.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_pause_InvalidValuesError.html [new file with mode: 0755]
common/tct-download-tizen-tests/download/DownloadManager_resume_InvalidValuesError.html [new file with mode: 0755]
common/tct-download-tizen-tests/tests.full.xml
common/tct-download-tizen-tests/tests.xml

diff --git a/common/tct-download-tizen-tests/download/DownloadManager_abandon.html b/common/tct-download-tizen-tests/download/DownloadManager_abandon.html
new file mode 100755 (executable)
index 0000000..fb0baf0
--- /dev/null
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_abandon</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_abandon
+//==== LABEL Check if DownloadManager::abandon() method works
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:abandon M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
+//==== ONLOAD_DELAY 90
+//==== PRIORITY P1
+//==== TEST_CRITERIA MAST MR
+
+setup({timeout: 90000});
+
+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) {
+            try {
+                retValue = tizen.download.abandon(downloadId);
+                assert_equals(retValue, undefined, "abandon returns wrong value");
+            } catch (e) {
+                assert_unreached("abandon() failed: " + e.name + " with message: " + e.message);
+            }
+
+            assert_throws(INVALID_VALUES_EXCEPTION, function () {
+                tizen.download.resume(downloadId);
+            }, "Should throw InvalidValuesError exception");
+            t.done();
+        }),
+        onpaused: t.step_func(function (id) {
+            assert_unreached("onpaused should not be reached");
+        }),
+        oncanceled: t.step_func(function (id) {
+            assert_unreached("oncanceled should not be reached");
+        }),
+        oncompleted: t.step_func(function (id, path) {
+            assert_unreached("oncompleted should not be reached");
+        }),
+        onfailed: t.step_func(function (id, error) {
+            assert_unreached("onfailed should not be reached: name: " + error.name + ", msg: " + error.message);
+        })
+    };
+
+    downloadRequest = new tizen.DownloadRequest(URL_LARGE, "documents");
+    downloadId = tizen.download.start(downloadRequest, listener);
+});
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_abandon_InvalidValuesError.html b/common/tct-download-tizen-tests/download/DownloadManager_abandon_InvalidValuesError.html
new file mode 100755 (executable)
index 0000000..6af8170
--- /dev/null
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_abandon_InvalidValuesError</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_abandon_InvalidValuesError
+//==== LABEL Check if DownloadManager::abandon() method with invalid value throws exception
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:abandon M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
+//==== PRIORITY P2
+//==== TEST_CRITERIA MC
+
+test(function () {
+    var conversionTable, i, id;
+
+    conversionTableArray = getTypeConversionExceptions("double", false);
+    for (i = 0; i < conversionTableArray.length; i++) {
+        id = conversionTableArray[i][0];
+        assert_throws(INVALID_VALUES_EXCEPTION, function () {
+            tizen.download.abandon(id);
+        }, "Should throw InvalidValuesError exception");
+    }
+}, document.title);
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_abandon_exist.html b/common/tct-download-tizen-tests/download/DownloadManager_abandon_exist.html
new file mode 100755 (executable)
index 0000000..f0f3928
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_abandon_exist</title>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_abandon_exist
+//==== LABEL Check if DownloadManager::abandon() method exists
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:abandon M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+    assert_true("abandon" in tizen.download, "abandon method not exist");
+    check_method_exists(tizen.download, "abandon");
+}, document.title);
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_abandon_misarg.html b/common/tct-download-tizen-tests/download/DownloadManager_abandon_misarg.html
new file mode 100755 (executable)
index 0000000..416fe81
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_abandon_misarg</title>
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_abandon_misarg
+//==== LABEL Check if DownloadManager::abandon() method without parameter throws correct exception
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:abandon M
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html
+//==== PRIORITY P2
+//==== TEST_CRITERIA MMA
+
+test(function () {
+    assert_throws(INVALID_VALUES_EXCEPTION, function () {
+        tizen.download.abandon();
+    }, "Should throw InvalidValuesError exception");
+}, document.title);
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_cancel_InvalidValuesError.html b/common/tct-download-tizen-tests/download/DownloadManager_cancel_InvalidValuesError.html
new file mode 100755 (executable)
index 0000000..0966890
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_cancel_InvalidValuesError</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_cancel_InvalidValuesError
+//==== LABEL Check if DownloadManager::cancel() method throws exception after download operation is abandoned
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:cancel M
+//==== SPEC_URL https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html
+//==== PRIORITY P2
+//==== ONLOAD_DELAY 90
+//==== TEST_CRITERIA MC
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null, downloadId, listener;
+
+t.step(function () {
+    listener = {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
+            tizen.download.abandon(downloadId);
+
+            assert_throws(INVALID_VALUES_EXCEPTION, function () {
+                tizen.download.cancel(downloadId);
+            }, "Should throw InvalidValuesError exception");
+            t.done();
+        }),
+        onpaused: t.step_func(function (id) {
+            assert_unreached("onpaused should not be reached");
+        }),
+        oncanceled: t.step_func(function (id) {
+            assert_unreached("oncanceled should not be reached");
+        }),
+        oncompleted: t.step_func(function (id, fullPath) {
+            assert_unreached("oncompleted should not be reached");
+        }),
+        onfailed: t.step_func(function (id, error) {
+            assert_unreached("onfailed should not be reached");
+        })
+    };
+
+    downloadRequest = new tizen.DownloadRequest(URL_LARGE, "documents");
+    downloadId = tizen.download.start(downloadRequest, listener);
+});
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_ABANDONED.html b/common/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_ABANDONED.html
new file mode 100755 (executable)
index 0000000..de128ab
--- /dev/null
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_getState_url_URL_ABANDONED</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_getState_url_URL_ABANDONED
+//==== LABEL Check if DownloadManager::getState() method works while download initiated at downloads with large url and abandon method is called
+//==== 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
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null, downloadId, listener, state;
+
+t.step(function () {
+    add_result_callback(function(){
+        try {
+            tizen.download.cancel(downloadId);
+        } catch (err) {
+        }
+    });
+
+    listener = {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
+            tizen.download.abandon(downloadId);
+            state = tizen.download.getState(downloadId);
+            assert_equals(state, "ABANDONED", "download state different from abandon");
+            t.done();
+        }),
+        onpaused: t.step_func(function (id) {
+            assert_unreached("onpaused should not be reached");
+        }),
+        oncanceled: t.step_func(function (id) {
+            assert_unreached("oncanceled should not be reached");
+        }),
+        oncompleted: t.step_func(function (id, fullPath) {
+            assert_unreached("oncompleted should not be reached");
+        }),
+        onfailed: t.step_func(function (id, error) {
+            assert_unreached("onfailed should not be reached");
+        })
+    };
+    downloadRequest = new tizen.DownloadRequest(URL_LARGE, "documents");
+    downloadId = tizen.download.start(downloadRequest, listener);
+});
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_pause_InvalidValuesError.html b/common/tct-download-tizen-tests/download/DownloadManager_pause_InvalidValuesError.html
new file mode 100755 (executable)
index 0000000..5bac86d
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_pause_InvalidValuesError</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_pause_InvalidValuesError
+//==== LABEL Check if DownloadManager::pause() method throws exception after download operation is abandoned
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:pause M
+//==== SPEC_URL https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html
+//==== PRIORITY P2
+//==== ONLOAD_DELAY 90
+//==== TEST_CRITERIA MC
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null, downloadId, listener;
+
+t.step(function () {
+    listener = {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
+            tizen.download.abandon(downloadId);
+
+            assert_throws(INVALID_VALUES_EXCEPTION, function () {
+                tizen.download.pause(downloadId);
+            }, "Should throw InvalidValuesError exception");
+            t.done();
+        }),
+        onpaused: t.step_func(function (id) {
+            assert_unreached("onpaused should not be reached");
+        }),
+        oncanceled: t.step_func(function (id) {
+            assert_unreached("oncanceled should not be reached");
+        }),
+        oncompleted: t.step_func(function (id, fullPath) {
+            assert_unreached("oncompleted should not be reached");
+        }),
+        onfailed: t.step_func(function (id, error) {
+            assert_unreached("onfailed should not be reached");
+        })
+    };
+
+    downloadRequest = new tizen.DownloadRequest(URL_LARGE, "documents");
+    downloadId = tizen.download.start(downloadRequest, listener);
+});
+
+</script>
+</body>
+</html>
diff --git a/common/tct-download-tizen-tests/download/DownloadManager_resume_InvalidValuesError.html b/common/tct-download-tizen-tests/download/DownloadManager_resume_InvalidValuesError.html
new file mode 100755 (executable)
index 0000000..746ab26
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<!--
+Copyright (c) 2019 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:
+        Qunfang Lin <qunfang.lin@samsung.com>
+
+-->
+
+<html>
+<head>
+<title>DownloadManager_resume_InvalidValuesError</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/download_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DownloadManager_resume_InvalidValuesError
+//==== LABEL Check if DownloadManager::resume() method throws exception after download operation is abandoned
+//==== SPEC Tizen Web API:Content:Download:DownloadManager:resume M
+//==== SPEC_URL https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html
+//==== PRIORITY P2
+//==== ONLOAD_DELAY 90
+//==== TEST_CRITERIA MC
+
+setup({timeout: 90000});
+
+var t = async_test(document.title, {timeout: 90000}), downloadRequest = null, downloadId, listener;
+
+t.step(function () {
+    listener = {
+        onprogress: t.step_func(function (id, receivedSize, totalSize) {
+            tizen.download.abandon(downloadId);
+
+            assert_throws(INVALID_VALUES_EXCEPTION, function () {
+                tizen.download.resume(downloadId);
+            }, "Should throw InvalidValuesError exception");
+            t.done();
+        }),
+        onpaused: t.step_func(function (id) {
+            assert_unreached("onpaused should not be reached");
+        }),
+        oncanceled: t.step_func(function (id) {
+            assert_unreached("oncanceled should not be reached");
+        }),
+        oncompleted: t.step_func(function (id, fullPath) {
+            assert_unreached("oncompleted should not be reached");
+        }),
+        onfailed: t.step_func(function (id, error) {
+            assert_unreached("onfailed should not be reached");
+        })
+    };
+
+    downloadRequest = new tizen.DownloadRequest(URL_LARGE, "documents");
+    downloadId = tizen.download.start(downloadRequest, listener);
+});
+
+</script>
+</body>
+</html>
index 54777f6a8dabddfce3ac7bbae4f5dcc30cefd9c5..b207c12e12c6515c8c0dcd2c93302970c1b83be5 100755 (executable)
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method exists" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_abandon_exist">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon_exist.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="abandon" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if DownloadManager::getState() method exists" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_exist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_exist.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method works" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_abandon">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="abandon" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if DownloadManager::start() method with downloadRequest non-optional argument works" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_start">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::cancel() method throws exception after download operation is abandoned" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_cancel_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_cancel_InvalidValuesError.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="cancel" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if DownloadManager::cancel() method without parameter throws correct exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_cancel_noarg">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_cancel_noarg.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at documents with large url" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_getState_url_DOWNLOADING">
+      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at documents with large url" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_url_DOWNLOADING">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_url_DOWNLOADING.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at downloads with large url and cancel method is called" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_getState_url_URL_CANCELED">
+      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at downloads with large url and cancel method is called" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_url_URL_CANCELED">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_CANCELED.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at downloads with large url and pause method is called" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_getState_url_URL_PAUSE">
+      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at downloads with large url and pause method is called" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_url_URL_PAUSE">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_PAUSE.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at downloads with large url and abandon method is called" type="compliance" onload_delay="90" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_url_URL_ABANDONED">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_ABANDONED.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="getState" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if DownloadManager::pause() method with incompatible parameter throws correct exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_pause_invalidvalues">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_pause_invalidvalues.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::pause() method throws exception after download operation is abandoned" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_pause_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_pause_InvalidValuesError.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="pause" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if DownloadManager::pause() method without parameter throws correct exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_pause_noarg">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_pause_noarg.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::resume() method throws exception after download operation is abandoned" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_resume_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume_InvalidValuesError.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="resume" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
       <testcase purpose="Check if DownloadManager::resume() method without parameter throws correct exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_resume_noarg">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume_noarg.html</test_script_entry>
           </spec>
         </specs>
       </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method without parameter throws correct exception" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_abandon_misarg">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon_misarg.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="abandon" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method throws exception after download operation is abandoned" type="compliance" status="approved" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_abandon_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon_InvalidValuesError.html</test_script_entry>
+        </description>
+        <specs>
+          <spec>
+            <spec_assertion interface="DownloadManager" element_type="method" element_name="abandon" specification="Download" section="Content" category="Tizen Device API Specifications"/>
+            <spec_url>https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/download.html</spec_url>
+            <spec_statement>TBD</spec_statement>
+          </spec>
+        </specs>
+      </testcase>
     </set>
   </suite>
 </test_definition>
index 807a06804203d97cde729ed7546e3cc1646ae1ff..ed07e2a923613358ef11d5e8a81e664b603c44e9 100755 (executable)
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume_exist.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method exists" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P0" id="DownloadManager_abandon_exist">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon_exist.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if DownloadManager::getState() method exists" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P0" id="DownloadManager_getState_exist">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_exist.html</test_script_entry>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method works" onload_delay="90" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_abandon">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if DownloadManager::start() method with downloadRequest non-optional argument works" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_start">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_start.html</test_script_entry>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManagerObject_notexist.html</test_script_entry>
         </description>
       </testcase>
-            <testcase purpose="Check if DownloadManager::cancel() method with incompatible parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_cancel_invalidvalues">
+      <testcase purpose="Check if DownloadManager::cancel() method with incompatible parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_cancel_invalidvalues">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_cancel_invalidvalues.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::cancel() method throws exception after download operation is abandoned" onload_delay="90" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_cancel_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_cancel_InvalidValuesError.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if DownloadManager::cancel() method without parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_cancel_noarg">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_cancel_noarg.html</test_script_entry>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_PAUSE.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::getState() method works while download initiated at downloads with large url and abandon method is called" onload_delay="90" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P1" id="DownloadManager_getState_url_URL_ABANDONED">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_getState_url_URL_ABANDONED.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if DownloadManager::pause() method with incompatible parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_pause_invalidvalues">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_pause_invalidvalues.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::pause() method throws exception after download operation is abandoned" onload_delay="90" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_pause_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_pause_InvalidValuesError.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if DownloadManager::pause() method without parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_pause_noarg">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_pause_noarg.html</test_script_entry>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume_invalidvalues.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::resume() method throws exception after download operation is abandoned" onload_delay="90" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_resume_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume_InvalidValuesError.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase purpose="Check if DownloadManager::resume() method without parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_resume_noarg">
         <description>
           <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_resume_noarg.html</test_script_entry>
         </description>
       </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method without parameter throws correct exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_abandon_misarg">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon_misarg.html</test_script_entry>
+        </description>
+      </testcase>
+      <testcase purpose="Check if DownloadManager::abandon() method with invalid value throws exception" component="Tizen Device APIs/Content/Download" execution_type="auto" priority="P2" id="DownloadManager_abandon_InvalidValuesError">
+        <description>
+          <test_script_entry>/opt/tct-download-tizen-tests/download/DownloadManager_abandon_InvalidValuesError.html</test_script_entry>
+        </description>
+      </testcase>
     </set>
   </suite>
 </test_definition>
\ No newline at end of file