+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 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:
- Zhongyuan Yuan <zy123.yuan@samsung.com>
-
--->
-<html>
-<head>
-<title>ArchiveFileEntry_extract_destinationDirectory_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/archive_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ArchiveFileEntry_extract_destinationDirectory_TypeMismatch
-//==== LABEL Check argument ArchiveFileEntry extract method destinationDirectory conversions exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:I/O:Archive:ArchiveFileEntry:extract M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html
-//==== TEST_CRITERIA MC
-
-var t = async_test(document.title), i, createSuccess, getEntrySuccess, destinationDirectory, exceptionName,
- conversionTable;
-
-t.step(function () {
- getEntrySuccess = t.step_func(function (entry) {
- conversionTable = getTypeConversionExceptions("object", true);
- for (i = 0; i < conversionTable.length; i++) {
- destinationDirectory = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName}, function () {
- entry.extract(destinationDirectory);
- }, exceptionName + " should be thrown - given incorrect.");
- }
- t.done();
- });
-
- createSuccess = t.step_func(function (archive) {
- archive.getEntryByName("my_file.txt", getEntrySuccess);
- });
-
- tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
});
getEntrySuccess = t.step_func(function (entry) {
- conversionTable = getTypeConversionExceptions("functionObject", false);
+ conversionTable = getTypeConversionExceptions("functionObject", true);
for (i = 0; i < conversionTable.length; i++) {
errorCallback = conversionTable[i][0];
exceptionName = conversionTable[i][1];
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 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:
- Zhongyuan Yuan <zy123.yuan@samsung.com>
-
--->
-<html>
-<head>
-<title>ArchiveFileEntry_extract_overwrite_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/archive_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ArchiveFileEntry_extract_overwrite_TypeMismatch
-//==== LABEL Check argument ArchiveFileEntry extract method overwrite conversions exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:I/O:Archive:ArchiveFileEntry:extract M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html
-//==== TEST_CRITERIA MC
-
-var t = async_test(document.title), i, createSuccess, getEntrySuccess, extractSuccessCallback,
- exceptionName, conversionTable, errorCallback, progressCallback, overwrite;
-
-t.step(function () {
- extractSuccessCallback = t.step_func(function () {
- assert_unreached("extractSuccessCallback callback invoked");
- });
-
- errorCallback = t.step_func(function () {
- assert_unreached("errorCallback callback invoked");
- });
-
- progressCallback = t.step_func(function () {
- assert_unreached("progressCallback callback invoked");
- });
-
- getEntrySuccess = t.step_func(function (entry) {
- conversionTable = getTypeConversionExceptions("boolean", true);
- for (i = 0; i < conversionTable.length; i++) {
- overwrite = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName}, function () {
- entry.extract("/home/owner/share/Downloads", extractSuccessCallback, errorCallback, progressCallback, false, overwrite);
- }, exceptionName + " should be thrown - given incorrect.");
- }
- t.done();
- });
-
- createSuccess = t.step_func(function (archive) {
- archive.getEntryByName("my_file.txt", getEntrySuccess);
- });
-
- tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 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:
- Zhongyuan Yuan <zy123.yuan@samsung.com>
-
--->
-<html>
-<head>
-<title>ArchiveFileEntry_extract_stripName_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/archive_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ArchiveFileEntry_extract_stripName_TypeMismatch
-//==== LABEL Check argument ArchiveFileEntry extract method stripName conversions exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:I/O:Archive:ArchiveFileEntry:extract M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html
-//==== TEST_CRITERIA MC
-
-var t = async_test(document.title), i, createSuccess, getEntrySuccess, extractSuccessCallback,
- exceptionName, conversionTable, errorCallback, progressCallback, stripName;
-
-t.step(function () {
- extractSuccessCallback = t.step_func(function () {
- assert_unreached("extractSuccessCallback callback invoked");
- });
-
- errorCallback = t.step_func(function () {
- assert_unreached("errorCallback callback invoked");
- });
-
- progressCallback = t.step_func(function () {
- assert_unreached("progressCallback callback invoked");
- });
-
- getEntrySuccess = t.step_func(function (entry) {
- conversionTable = getTypeConversionExceptions("boolean", true);
- for (i = 0; i < conversionTable.length; i++) {
- stripName = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName}, function () {
- entry.extract("/home/owner/share/Downloads", extractSuccessCallback, errorCallback, progressCallback, stripName);
- }, exceptionName + " should be thrown - given incorrect.");
- }
- t.done();
- });
-
- createSuccess = t.step_func(function (archive) {
- archive.getEntryByName("my_file.txt", getEntrySuccess);
- });
-
- tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
});
createSuccess = t.step_func(function (archive) {
- conversionTable = getTypeConversionExceptions("object", true);
+ conversionTable = getTypeConversionExceptions("functionObject", true);
for (i = 0; i < conversionTable.length; i++) {
- onprogress = conversionTable[i][0];
+ onprogressCallback = conversionTable[i][0];
exceptionName = conversionTable[i][1];
assert_throws({name: exceptionName}, function () {
- archive.extractAll("../resources/extracted", successCallback, errorCallback, onprogress);
- }, exceptionName + " sGiven incorrect successCallback.");
+ archive.extractAll("../resources/extracted", successCallback, errorCallback, onprogressCallback);
+ }, exceptionName + " sGiven incorrect successCallback = " + onprogressCallback);
};
t.done();
});
- tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "a", createSuccess);
+ tizen.archive.open(TEST_ARCHIVE_FILE_ZIP, "r", createSuccess);
});
</script>
</spec>
</specs>
</testcase>
- <testcase purpose="Check argument ArchiveFileEntry extract method destinationDirectory conversions exception" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P2" id="ArchiveFileEntry_extract_destinationDirectory_TypeMismatch">
- <description>
- <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="ArchiveFileEntry" element_type="method" element_name="description" specification="Archive" section="IO" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if method extract of ArchiveFileEntry exist" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P0" id="ArchiveFileEntry_extract_exist">
<description>
<test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_exist.html</test_script_entry>
</spec>
</specs>
</testcase>
- <testcase purpose="Check argument ArchiveFileEntry extract method overwrite conversions exception" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P2" id="ArchiveFileEntry_extract_overwrite_TypeMismatch">
- <description>
- <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="ArchiveFileEntry" element_type="method" element_name="description" specification="Archive" section="IO" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
- <testcase purpose="Check argument ArchiveFileEntry extract method stripName conversions exception" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P2" id="ArchiveFileEntry_extract_stripName_TypeMismatch">
- <description>
- <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html</test_script_entry>
- </description>
- <specs>
- <spec>
- <spec_assertion interface="ArchiveFileEntry" element_type="method" element_name="description" specification="Archive" section="IO" category="Tizen Device API Specifications"/>
- <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/Archive.html</spec_url>
- <spec_statement>TBD</spec_statement>
- </spec>
- </specs>
- </testcase>
<testcase purpose="Check if ArchiveFileEntry::extract() method functions properly with optional arguments" type="compliance" status="approved" component="Tizen Device APIs/IO/Archive" execution_type="auto" priority="P1" id="ArchiveFileEntry_extract_with_onerror">
<description>
<test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_with_onerror.html</test_script_entry>
<test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_by_FileObject.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check argument ArchiveFileEntry extract method destinationDirectory conversions exception" execution_type="auto" id="ArchiveFileEntry_extract_destinationDirectory_TypeMismatch" priority="P2" component="Tizen Device APIs/IO/Archive">
- <description>
- <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_destinationDirectory_TypeMismatch.html</test_script_entry>
- </description>
- </testcase>
<testcase purpose="Check if method extract of ArchiveFileEntry exist" execution_type="auto" id="ArchiveFileEntry_extract_exist" priority="P0" component="Tizen Device APIs/IO/Archive">
<description>
<test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_exist.html</test_script_entry>
<test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_onsuccess_TypeMismatch.html</test_script_entry>
</description>
</testcase>
- <testcase purpose="Check argument ArchiveFileEntry extract method overwrite conversions exception" execution_type="auto" id="ArchiveFileEntry_extract_overwrite_TypeMismatch" priority="P2" component="Tizen Device APIs/IO/Archive">
- <description>
- <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_overwrite_TypeMismatch.html</test_script_entry>
- </description>
- </testcase>
- <testcase purpose="Check argument ArchiveFileEntry extract method stripName conversions exception" execution_type="auto" id="ArchiveFileEntry_extract_stripName_TypeMismatch" priority="P2" component="Tizen Device APIs/IO/Archive">
- <description>
- <test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_stripName_TypeMismatch.html</test_script_entry>
- </description>
- </testcase>
<testcase purpose="Check if ArchiveFileEntry::extract() method functions properly with optional arguments" execution_type="auto" id="ArchiveFileEntry_extract_with_onerror" priority="P1" component="Tizen Device APIs/IO/Archive">
<description>
<test_script_entry>/opt/tct-archive-tizen-tests/archive/ArchiveFileEntry_extract_with_onerror.html</test_script_entry>