cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject spec commit: CB-5404: Fix three tests that were sensitive to existing files
Date Fri, 22 Nov 2013 16:53:47 GMT
Updated Branches:
  refs/heads/master b949ac208 -> 7b5ef9396


CB-5404: Fix three tests that were sensitive to existing files


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/7b5ef939
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/7b5ef939
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/7b5ef939

Branch: refs/heads/master
Commit: 7b5ef93960de4e4ef3f8b7de8ea3123d228dc73a
Parents: b949ac2
Author: Ian Clelland <iclelland@chromium.org>
Authored: Fri Nov 22 11:53:22 2013 -0500
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Fri Nov 22 11:53:22 2013 -0500

----------------------------------------------------------------------
 autotest/tests/file.tests.js | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/7b5ef939/autotest/tests/file.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/file.tests.js b/autotest/tests/file.tests.js
index 9ed6776..af59fa3 100644
--- a/autotest/tests/file.tests.js
+++ b/autotest/tests/file.tests.js
@@ -1722,7 +1722,9 @@ describe('File API', function() {
 
             // create a new file entry to kick off it
             runs(function() {
-                createFile(file1, entryCallback, fail);
+                deleteEntry(file2, function() {
+                    createFile(file1, entryCallback, fail);
+                }, fail);
             });
 
             waitsFor(function() { return entryCallback.wasCalled; }, "entryCallback never
called", Tests.TEST_TIMEOUT);
@@ -1829,7 +1831,9 @@ describe('File API', function() {
 
             // create a new directory entry to kick off it
             runs(function() {
-                createDirectory(srcDir, entryCallback, fail);
+                deleteEntry(dstDir, function() {
+                    createDirectory(srcDir, entryCallback, fail);
+                }, fail);
             });
 
             waitsFor(function() { return entryCallback.wasCalled; }, "entryCallback never
called", Tests.TEST_TIMEOUT);
@@ -1888,7 +1892,9 @@ describe('File API', function() {
 
             // create a new directory entry to kick off it
             runs(function() {
-                createDirectory(srcDir, entryCallback, fail);
+                deleteEntry(dstDir, function() {
+                    createDirectory(srcDir, entryCallback, fail);
+                }, fail);
             });
 
             waitsFor(function() { return itFileExists.wasCalled; }, "itFileExists", 10000);


Mime
View raw message