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/12/13 17:20:12 UTC
[2/2] spec commit: CB-5466: Replace FS URLs in file-transfer tests
CB-5466: Replace FS URLs in file-transfer tests
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/babc6e1d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/babc6e1d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/babc6e1d
Branch: refs/heads/master
Commit: babc6e1dc86a0fb58d0deb6216514a4d42737f69
Parents: 4e31ad0
Author: Ian Clelland <ic...@chromium.org>
Authored: Wed Dec 11 16:01:09 2013 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Dec 13 11:20:03 2013 -0500
----------------------------------------------------------------------
autotest/tests/filetransfer.tests.js | 44 +++++++++++++++----------------
1 file changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/babc6e1d/autotest/tests/filetransfer.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/filetransfer.tests.js b/autotest/tests/filetransfer.tests.js
index 304eea1..c0f0323 100644
--- a/autotest/tests/filetransfer.tests.js
+++ b/autotest/tests/filetransfer.tests.js
@@ -127,7 +127,7 @@ describe('FileTransfer', function() {
ft.onprogress = function(e) {
lastProgressEvent = e;
};
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, fail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, fail);
});
waitsForAny(downloadWin, fail);
@@ -151,7 +151,7 @@ describe('FileTransfer', function() {
ft.onprogress = function(e) {
lastProgressEvent = e;
};
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, fail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, fail);
});
waitsForAny(downloadWin, fail);
@@ -171,7 +171,7 @@ describe('FileTransfer', function() {
});
runs(function() {
var ft = new FileTransfer();
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
@@ -200,7 +200,7 @@ describe('FileTransfer', function() {
ft.onprogress = function(e) {
lastProgressEvent = e;
};
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, fail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, fail);
waitsForAny(downloadWin, fail);
});
@@ -222,7 +222,7 @@ describe('FileTransfer', function() {
runs(function() {
var ft = new FileTransfer();
console.log("8");
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(fileWin, downloadFail, fileFail);
@@ -248,7 +248,7 @@ describe('FileTransfer', function() {
ft.abort();
}
};
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
@@ -270,7 +270,7 @@ describe('FileTransfer', function() {
runs(function() {
var ft = new FileTransfer();
ft.abort(); // should be a no-op.
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
ft.abort();
ft.abort(); // should be a no-op.
});
@@ -290,7 +290,7 @@ describe('FileTransfer', function() {
runs(function() {
var ft = new FileTransfer();
ft.abort(); // should be a no-op.
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
ft.abort();
ft.abort(); // should be a no-op.
});
@@ -312,7 +312,7 @@ describe('FileTransfer', function() {
});
runs(function() {
var ft = new FileTransfer();
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
@@ -332,7 +332,7 @@ describe('FileTransfer', function() {
});
runs(function() {
var ft = new FileTransfer();
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
@@ -355,7 +355,7 @@ describe('FileTransfer', function() {
});
runs(function() {
var ft = new FileTransfer();
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
@@ -371,7 +371,7 @@ describe('FileTransfer', function() {
runs(function() {
var ft = new FileTransfer();
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
@@ -411,7 +411,7 @@ describe('FileTransfer', function() {
ft.onprogress = function(e) {
lastProgressEvent = e;
};
- ft.download(remoteFile, root.fullPath + "/" + localFileName, downloadWin, downloadFail);
+ ft.download(remoteFile, root.toURL() + "/" + localFileName, downloadWin, downloadFail);
});
waitsForAny(downloadWin, downloadFail);
});
@@ -453,7 +453,7 @@ describe('FileTransfer', function() {
};
// removing options cause Android to timeout
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, options);
};
this.after(function() {
@@ -504,7 +504,7 @@ describe('FileTransfer', function() {
};
// removing options cause Android to timeout
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, options);
};
this.after(function() {
@@ -538,7 +538,7 @@ describe('FileTransfer', function() {
options.fileName=fileEntry.name;
options.mimeType="text/plain";
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, options);
};
this.after(function() {
@@ -574,7 +574,7 @@ describe('FileTransfer', function() {
startTime = +new Date();
// removing options cause Android to timeout
ft.abort(); // should be a no-op.
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, options);
ft.abort();
ft.abort(); // should be a no-op.
};
@@ -607,7 +607,7 @@ describe('FileTransfer', function() {
options.fileName=fileEntry.name;
options.mimeType="text/plain";
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, options);
};
this.after(function() {
@@ -631,7 +631,7 @@ describe('FileTransfer', function() {
});
var fileWin = function(fileEntry) {
var ft = new FileTransfer();
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, {});
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, {});
};
this.after(function() {
@@ -655,7 +655,7 @@ describe('FileTransfer', function() {
});
var fileWin = function(fileEntry) {
var ft = new FileTransfer();
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, {});
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, {});
};
this.after(function() {
@@ -680,7 +680,7 @@ describe('FileTransfer', function() {
runs(function() {
var ft = new FileTransfer();
- ft.upload(root.fullPath + "/" + localFileName, remoteFile, uploadWin, uploadFail);
+ ft.upload(root.toURL() + "/" + localFileName, remoteFile, uploadWin, uploadFail);
});
waitsForAny(uploadWin, uploadFail);
@@ -735,7 +735,7 @@ describe('FileTransfer', function() {
};
// removing options cause Android to timeout
- ft.upload(fileEntry.fullPath, remoteFile, uploadWin, uploadFail, options);
+ ft.upload(fileEntry.toURL(), remoteFile, uploadWin, uploadFail, options);
};
this.after(function() {