cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/3] cordova-plugin-file git commit: Revert change to test 111 so that it passes again on Android and iOS
Date Thu, 05 Feb 2015 01:58:04 GMT
Revert change to test 111 so that it passes again on Android and iOS

Change was made in bcbeae24cd24583b7


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/b836218d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/b836218d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/b836218d

Branch: refs/heads/master
Commit: b836218dfd438eb73ae70d28060e26c0663c0165
Parents: 58a6eb2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Wed Feb 4 20:52:18 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Feb 4 20:52:54 2015 -0500

----------------------------------------------------------------------
 tests/tests.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/b836218d/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index b8c6e5d..1aa9d9c 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -2695,11 +2695,15 @@ exports.defineAutoTests = function () {
                     // lookup file system entry
                     root.getFile('../' + fileName, {
                         create : false
-                    }, succeed.bind(null, done, "root.getFile('../"+fileName+ "')- Unexpected
success callback, it should not traverse abvoe the root directory"), 
-                    function (error) {
-                        expect(error).toBeDefined();
+                    }, function (fileEntry) {
+                        // Note: we expect this to still resolve, as the correct behaviour
is to ignore the ../, not to fail out.
+                        expect(fileEntry).toBeDefined();
+                        expect(fileEntry.name).toBe(fileName);
+                        expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath +'/'
+ fileName);
+                        // cleanup
+                        deleteEntry(fileName);
                         done();
-                    });
+                    }, failed.bind(null, done, 'root.getFile - Error getting file: ../' +
fileName));
                 }, failed.bind(null, done, 'createFile - Error creating file: ../' + fileName));
             });
             it("file.spec.112 should traverse above above the current directory", function
(done) {


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


Mime
View raw message