[headed-emulator][file-transfer] add check for download failed 11/317611/1
authorchen <chen89.chen@samsung.com>
Thu, 12 Sep 2024 23:21:04 +0000 (07:21 +0800)
committerchen <chen89.chen@samsung.com>
Thu, 12 Sep 2024 23:21:13 +0000 (07:21 +0800)
Change-Id: I68c99f8200c0f39b15bdeff1cb7fc98ceed5ab00
Signed-off-by: chen <chen89.chen@samsung.com>
common/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransfer_download.html

index 3071001d781518d7e03ad46f5325765ef02ef511..9205b3be6bad657bcaae44c86bb59465105bf469 100755 (executable)
@@ -24,6 +24,7 @@ Authors:
 <meta charset="utf-8"/>
 <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>
@@ -49,8 +50,10 @@ t.step(function () {
     });
 
     deviceready = t.step_func(function () {
+        console.log(window.location.href)
         fileTransfer = new FileTransfer();
-        remoteFile = window.location.href.replace(/\?.*/, '').replace(/ /g, '%20');
+        loc = "/opt/tct-file-transfer-cordova-tests/file-transfer/cordova_FileTransfer_download.html";
+        remoteFile = loc.replace(/\?.*/, '').replace(/ /g, '%20');
         localFileName = remoteFile.substring(remoteFile.lastIndexOf('/')+1);
         file = "file:///home/owner/share/Documents/" + localFileName;
         retVal = fileTransfer.download(remoteFile, file, successCallback, errorCallback);