You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2013/11/17 05:53:35 UTC
spec commit: CB-5405: Update tests to work with URL paths in File
objects
Updated Branches:
refs/heads/master d6f07da69 -> 196bb1f07
CB-5405: Update tests to work with URL paths in File objects
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/196bb1f0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/196bb1f0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/196bb1f0
Branch: refs/heads/master
Commit: 196bb1f07e5252cbde9c11338d0bf803d20ed89c
Parents: d6f07da
Author: Ian Clelland <ic...@chromium.org>
Authored: Sat Nov 16 23:50:30 2013 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Sat Nov 16 23:50:30 2013 -0500
----------------------------------------------------------------------
autotest/tests/file.tests.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/196bb1f0/autotest/tests/file.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/file.tests.js b/autotest/tests/file.tests.js
index ab02752..e830dc4 100644
--- a/autotest/tests/file.tests.js
+++ b/autotest/tests/file.tests.js
@@ -1150,7 +1150,6 @@ describe('File API', function() {
it("file.spec.40 should be define File attributes", function() {
var file = new File();
expect(file.name).toBeDefined();
- expect(file.fullPath).toBeDefined();
expect(file.type).toBeDefined();
expect(file.lastModifiedDate).toBeDefined();
expect(file.size).toBeDefined();
@@ -3009,7 +3008,10 @@ describe('File API', function() {
});
reader.onerror = verifier;
var myFile = new File();
+ // old API internals: use fullPath in File object
myFile.fullPath = joinURL(root.fullPath, "doesnotexist.err");
+ // new API internals: use localURL in File object
+ myFile.localURL = joinURL(root.toURL(), "doesnotexist.err");
reader.readAsText(myFile);
@@ -3266,7 +3268,10 @@ describe('File API', function() {
it("file.spec.97 should be able to write and append to file, File object", function() {
var fileName = "writer.append",
theWriter,
+ // old API internals: use fullPath in File object
filePath = joinURL(root.fullPath, fileName),
+ // new API internals: use localURL in File object
+ localURL = joinURL(root.toURL(), fileName),
// file content
rule = "There is an exception to every rule.",
// for checking file length
@@ -3299,7 +3304,10 @@ describe('File API', function() {
// create file, then write and append to it
runs(function() {
var file = new File();
+ // old API internals: use fullPath in File object
file.fullPath = filePath;
+ // new API internals: use localURL in File object
+ file.localURL = localURL;
write_file(file);
});