You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by kn...@apache.org on 2019/03/08 07:20:05 UTC

[cordova-plugin-file] branch travis_tests updated: add more debug logs

This is an automated email from the ASF dual-hosted git repository.

knaito pushed a commit to branch travis_tests
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-file.git


The following commit(s) were added to refs/heads/travis_tests by this push:
     new f4b7a31  add more debug logs
f4b7a31 is described below

commit f4b7a31432d46bc945c0b133b8083c8da1232c9a
Author: knaito <kn...@asial.co.jp>
AuthorDate: Fri Mar 8 16:19:45 2019 +0900

    add more debug logs
---
 tests/tests.js                   | 1 +
 www/resolveLocalFileSystemURI.js | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/tests/tests.js b/tests/tests.js
index edc22bb..7160ce9 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -310,6 +310,7 @@ exports.defineAutoTests = function () {
                 it('file.spec.9 should resolve a valid file name', function (done) {
                     var fileName = 'file.spec.9';
                     var win = function (fileEntry) {
+                        window.customLog('log', '----- win is called ----');
                         expect(fileEntry).toBeDefined();
                         expect(fileEntry.isFile).toBe(true);
                         expect(fileEntry.isDirectory).toBe(false);
diff --git a/www/resolveLocalFileSystemURI.js b/www/resolveLocalFileSystemURI.js
index 764662c..68238bf 100644
--- a/www/resolveLocalFileSystemURI.js
+++ b/www/resolveLocalFileSystemURI.js
@@ -46,8 +46,10 @@
      */
     module.exports.resolveLocalFileSystemURL = module.exports.resolveLocalFileSystemURL || function (uri, successCallback, errorCallback) {
         argscheck.checkArgs('sFF', 'resolveLocalFileSystemURI', arguments);
+        window.customLog('log', 'resolveLocalFileSystemURL is called');
         // error callback
         var fail = function (error) {
+            window.customLog('log', 'error callback is called');
             if (errorCallback) {
                 errorCallback(new FileError(error));
             }
@@ -62,8 +64,11 @@
         }
         // if successful, return either a file or directory entry
         var success = function (entry) {
+            window.customLog('log', 'resolveLocalFileSystemURL success callback step 1');
             if (entry) {
+                window.customLog('log', 'resolveLocalFileSystemURL success callback step 2');
                 if (successCallback) {
+                    window.customLog('log', 'resolveLocalFileSystemURL success callback step 3');
                     // create appropriate Entry object
                     var fsName = entry.filesystemName || (entry.filesystem && entry.filesystem.name) || (entry.filesystem === window.PERSISTENT ? 'persistent' : 'temporary'); // eslint-disable-line no-undef
                     fileSystems.getFs(fsName, function (fs) {
@@ -76,6 +81,7 @@
                     });
                 }
             } else {
+                window.customLog('log', 'resolveLocalFileSystemURL fail callback is called');
                 // no Entry object returned
                 fail(FileError.NOT_FOUND_ERR);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org