You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/04/02 16:45:28 UTC
spec commit: Adding test to catch CB-421 FileAPI: getParent() does
not return a valid DirectoryEntry
Updated Branches:
refs/heads/master 00852a9c2 -> bf49d843c
Adding test to catch CB-421 FileAPI: getParent() does not return a valid DirectoryEntry
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/bf49d843
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/bf49d843
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/bf49d843
Branch: refs/heads/master
Commit: bf49d843c515bfe36e6930b12e230806d0a068dd
Parents: 00852a9
Author: macdonst <si...@gmail.com>
Authored: Mon Apr 2 10:44:53 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Mon Apr 2 10:44:53 2012 -0400
----------------------------------------------------------------------
autotest/tests/file.tests.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/bf49d843/autotest/tests/file.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/file.tests.js b/autotest/tests/file.tests.js
index a64f567..501d246 100644
--- a/autotest/tests/file.tests.js
+++ b/autotest/tests/file.tests.js
@@ -1057,7 +1057,7 @@ Tests.prototype.FileTests = function() {
});
test("Entry.getParent on file in root file system", function() {
QUnit.stop(Tests.TEST_TIMEOUT);
- expect(2);
+ expect(3);
var fileName = "entry.parent.file",
that = this,
@@ -1068,6 +1068,7 @@ Tests.prototype.FileTests = function() {
testParent = function(parent) {
ok(typeof parent !== 'undefined' && parent !== null, "parent directory should not be null.");
equal(parent.fullPath, rootPath, "parent fullPath should be root file system");
+ ok(typeof parent.getParent === 'function', "entry object should have a 'getParent' function.");
// cleanup
that.deleteEntry(fileName);
@@ -1079,7 +1080,7 @@ Tests.prototype.FileTests = function() {
});
test("Entry.getParent on directory in root file system", function() {
QUnit.stop(Tests.TEST_TIMEOUT);
- expect(2);
+ expect(3);
var dirName = "entry.parent.dir",
that = this,
@@ -1090,6 +1091,7 @@ Tests.prototype.FileTests = function() {
testParent = function(parent) {
ok(typeof parent !== 'undefined' && parent !== null, "parent directory should not be null.");
equal(parent.fullPath, rootPath, "parent fullPath should be root file system");
+ ok(typeof parent.getParent === 'function', "entry object should have a 'getParent' function.");
// cleanup
that.deleteEntry(dirName);
@@ -1101,12 +1103,13 @@ Tests.prototype.FileTests = function() {
});
test("Entry.getParent on root file system", function() {
QUnit.stop(Tests.TEST_TIMEOUT);
- expect(2);
+ expect(3);
var rootPath = this.root.fullPath,
testParent = function(parent) {
ok(typeof parent !== 'undefined' && parent !== null, "parent directory should not be null.");
equal(parent.fullPath, rootPath, "parent fullPath should be root file system");
+ ok(typeof parent.getParent === 'function', "entry object should have a 'getParent' function.");
QUnit.start();
};