You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/04/30 04:36:27 UTC

[2/2] spec commit: CB-6525 Assert that fs.root.toURL() does not use cdvfile:

CB-6525 Assert that fs.root.toURL() does not use cdvfile:


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/78029f14
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/78029f14
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/78029f14

Branch: refs/heads/master
Commit: 78029f14ba941fcdc7468b1838f0643ace7ca5c3
Parents: 9cc4544
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Apr 29 22:35:29 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Apr 29 22:36:14 2014 -0400

----------------------------------------------------------------------
 autotest/tests/file.tests.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/78029f14/autotest/tests/file.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/file.tests.js b/autotest/tests/file.tests.js
index aa933e2..5f39654 100644
--- a/autotest/tests/file.tests.js
+++ b/autotest/tests/file.tests.js
@@ -151,7 +151,8 @@ describe('File API', function() {
                     expect(fileSystem.name).toBe("persistent");
                     expect(fileSystem.root).toBeDefined();
                     expect(fileSystem.root.filesystem).toBeDefined();
-                    expect(fileSystem.root.filesystem).toBe(fileSystem);
+                    // Shouldn't use cdvfile by default.
+                    expect(fileSystem.root.toURL()).not.toMatch(/^cdvfile:/);
                 }),
                 fail = createFail('window.requestFileSystem');
 
@@ -239,6 +240,8 @@ describe('File API', function() {
                 win = jasmine.createSpy().andCallFake(function(fileEntry) {
                     expect(fileEntry).toBeDefined();
                     expect(fileEntry.name).toCanonicallyMatch(fileName);
+                    // Shouldn't use cdvfile by default.
+                    expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/);
 
                     // cleanup
                     deleteEntry(fileName);