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 2013/01/21 23:00:56 UTC
spec commit: [CB-2235] Encoded spaces to fix a test.
Updated Branches:
refs/heads/master 28b89863a -> 9cf7235ef
[CB-2235] Encoded spaces to fix a test.
FileTransfer.download fails when the source URL has spaces. One test was failing because an attempt was accidentally being made to download from a URL with spaces; once encoded, the test passes.
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/9cf7235e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/9cf7235e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/9cf7235e
Branch: refs/heads/master
Commit: 9cf7235ef0db1492944913212c9abca3fd1a25f5
Parents: 28b8986
Author: Max Woghiren <ma...@gmail.com>
Authored: Mon Jan 21 16:42:36 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Jan 21 16:58:32 2013 -0500
----------------------------------------------------------------------
autotest/tests/filetransfer.tests.js | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/9cf7235e/autotest/tests/filetransfer.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/filetransfer.tests.js b/autotest/tests/filetransfer.tests.js
index 4aadfa8..da1fc82 100644
--- a/autotest/tests/filetransfer.tests.js
+++ b/autotest/tests/filetransfer.tests.js
@@ -138,7 +138,7 @@ describe('FileTransfer', function() {
});
it("should be able to download a file using file:// (when hosted from file://)", function() {
var fail = createDoNotCallSpy('downloadFail');
- var remoteFile = window.location.href.replace(/\?.*/, '');
+ var remoteFile = window.location.href.replace(/\?.*/, '').replace(/ /g, '%20');
var localFileName = remoteFile.substring(remoteFile.lastIndexOf('/')+1);
var lastProgressEvent = null;
@@ -287,7 +287,6 @@ describe('FileTransfer', function() {
});
});
describe('upload method', function() {
-
it("should be able to upload a file", function() {
var remoteFile = server + "/upload";
var localFileName = "upload.txt";