[common][file-transfer][DPTTIZEN-3169, fix 1 tc issue & delete 1 tc] 34/218534/1
authorzhongyuan <zy123.yuan@samsung.com>
Mon, 25 Nov 2019 06:47:04 +0000 (14:47 +0800)
committerzhongyuan <zy123.yuan@samsung.com>
Mon, 25 Nov 2019 06:52:31 +0000 (14:52 +0800)
Change-Id: I561e6f8fbd483cab389fdb0df980e21987396c4a

common/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransferError_onprogress.html [deleted file]
common/tct-file-transfer-cordova-tests/file-transfer/cordova_FileUploadResult_onprogress.html
common/tct-file-transfer-cordova-tests/tests.full.xml
common/tct-file-transfer-cordova-tests/tests.xml

diff --git a/common/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransferError_onprogress.html b/common/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransferError_onprogress.html
deleted file mode 100755 (executable)
index 855dc00..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
-        Mengli Zhang <mengli.zhang@samsung.com>
-
--->
-
-<html>
-<head>
-<title>cordova_FileTransferError_onprogress</title>
-<script src="support/unitcommon.js"></script>
-<script src="../cordova/cordova.js"></script>
-<script src="support/cordova_file-transfer_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: cordova_FileTransferError_onprogress
-//==== LABEL Check if FileTransferError onchanged is called and if its arguments have proper type
-//==== SPEC Cordova Plugin API:file-transfer:FileTransfer:upload M
-//==== SPEC_URL https://www.npmjs.com/package/cordova-plugin-file-transfer
-//==== PRIORITY P1
-//==== TEST_CRITERIA CBT CBOA
-
-var t = async_test(document.title, {timeout: 5000}), deviceready, options, fileURL, fileTransfer, uri,
-    successCallback, errorCallback;
-
-t.step(function () {
-    errorCallback = t.step_func(function (event) {
-        assert_type(event, "object", "event has wrong type");
-        assert_not_equals(event, null, "event should not be null");
-        assert_not_equals(event, undefined, "event should not be undefined");
-        t.done();
-    });
-
-    successCallback = t.step_func(function () {
-        assert_unreached("upload() successCallback should not be invoked.");
-    });
-
-    deviceready =t.step_func(function () {
-        fileTransfer = new FileTransfer();
-        uri = encodeURI("http://127.0.0.1/opt/tct-file-transfer-cordova-tests/file-transfer/support/upload.php");
-        fileTransfer.upload(FILE_URL, uri, successCallback, errorCallback);
-    });
-
-    document.addEventListener("deviceready", deviceready, true);
-});
-
-</script>
-</body>
-</html>
\ No newline at end of file
index dad9703f18cd87bbf717cea6e89e043f978579b2..8784cb834659c19eebc27319a981a86e8cf6b471 100755 (executable)
@@ -26,35 +26,37 @@ Authors:
 <script src="../cordova/cordova.js"></script>
 <script src="support/cordova_file-transfer_common.js"></script>
 </head>
-
 <body>
 <div id="log"></div>
 <script>
 //==== TEST: cordova_FileUploadResult_onprogress
-//==== LABEL Check if FileUploadResult onchanged is called and if its arguments have proper type
+//==== LABEL Check if FileUploadResult onprogress is called and if its arguments have proper type
 //==== SPEC Cordova Plugin API:file-transfer:FileTransfer:upload M
 //==== SPEC_URL https://www.npmjs.com/package/cordova-plugin-file-transfer
 //==== PRIORITY P1
 //==== TEST_CRITERIA CBT CBOA
 
-var t = async_test(document.title, {timeout: 5000}), deviceready, options, fileURL, fileTransfer, uri,
+var t = async_test(document.title, {timeout: 5000}), deviceready, fileTransfer, uri, onprogress,
     successCallback, errorCallback;
 
 t.step(function () {
     errorCallback = t.step_func(function (event) {
+    });
+
+    successCallback = t.step_func(function () {
+    });
+
+    onprogress = t.step_func(function (event) {
         assert_type(event, "object", "event has wrong type");
         assert_not_equals(event, null, "event should not be null");
         assert_not_equals(event, undefined, "event should not be undefined");
         t.done();
     });
 
-    successCallback = t.step_func(function () {
-        assert_unreached("upload() errorCallback should not be invoked.");
-    });
-
     deviceready =t.step_func(function () {
         fileTransfer = new FileTransfer();
         uri = encodeURI("http://127.0.0.1/opt/tct-file-transfer-cordova-tests/file-transfer/support/upload.php");
+        fileTransfer.onprogress = onprogress;
         fileTransfer.upload(FILE_URL, uri, successCallback, errorCallback);
     });
 
@@ -63,4 +65,4 @@ t.step(function () {
 
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 60ad0a6cc3ee80dad9eeb3ddfe813955c8655d28..07f581c3ebf754ef967dc737a6839e2f8866af45 100755 (executable)
@@ -3,20 +3,6 @@
 <test_definition>
   <suite name="tct-file-transfer-cordova-tests" extension="crosswalk" category="Cordova Plugin APIs">
     <set name="Filetransfer" type="js">
-      <testcase purpose="Check if FileTransferError onchanged is called and if its arguments have proper type" type="compliance" status="approved" component="TizenAPI/Cordova/Filetransfer" execution_type="auto" priority="P1" id="cordova_FileTransferError_onprogress">
-        <description>
-          <test_script_entry>/opt/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransferError_onprogress.html</test_script_entry>
-        </description>
-        <specs>
-      </specs>
-      </testcase>
-      <testcase purpose="Check if abort() method correctly abort file" type="compliance" status="approved" component="TizenAPI/Cordova/Filetransfer" execution_type="auto" priority="P1" id="cordova_FileTransfer_abort">
-        <description>
-          <test_script_entry>/opt/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransfer_abort.html</test_script_entry>
-        </description>
-        <specs>
-      </specs>
-      </testcase>
       <testcase purpose="Check if method abort exists" type="compliance" status="approved" component="TizenAPI/Cordova/Filetransfer" execution_type="auto" priority="P0" id="cordova_FileTransfer_abort_exist">
         <description>
           <test_script_entry>/opt/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransfer_abort_exist.html</test_script_entry>
index d31e92a109ef1e09f00a111e26e156572b80b40f..93b4ed8edec931170b1b1dedccb4c34fe2bf1e96 100755 (executable)
@@ -3,11 +3,6 @@
 <test_definition>
   <suite name="tct-file-transfer-cordova-tests" extension="crosswalk" category="Cordova Plugin APIs">
     <set name="Filetransfer" type="js">
-      <testcase purpose="Check if FileTransferError onchanged is called and if its arguments have proper type" component="TizenAPI/Cordova/Filetransfer" execution_type="auto" priority="P1" id="cordova_FileTransferError_onprogress">
-        <description>
-          <test_script_entry>/opt/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransferError_onprogress.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase purpose="Check if abort() method correctly abort file" component="TizenAPI/Cordova/Filetransfer" execution_type="auto" priority="P1" id="cordova_FileTransfer_abort">
         <description>
           <test_script_entry>/opt/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransfer_abort.html</test_script_entry>