cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject [3/3] git commit: CB-6466 Fix failing test due to recent url change
Date Fri, 15 Aug 2014 20:00:43 GMT
CB-6466 Fix failing test due to recent url change


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/b5d1dffc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/b5d1dffc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/b5d1dffc

Branch: refs/heads/master
Commit: b5d1dffc2f6b8c37fbca4df966cb0d0f74c86ca2
Parents: 974bbaa
Author: Michal Mocny <mmocny@gmail.com>
Authored: Fri Aug 15 14:58:07 2014 -0400
Committer: Michal Mocny <mmocny@gmail.com>
Committed: Fri Aug 15 15:00:34 2014 -0400

----------------------------------------------------------------------
 tests/tests.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/b5d1dffc/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index 213913c..7a795db 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -240,7 +240,7 @@ exports.defineAutoTests = function () {
             });
             it("filetransfer.spec.7 should be able to download a file using file:// (when
hosted from file://)", function (done) {
                 var downloadFail = createFail(done, "Download error callback should not have
been called");
-                var remoteFile = window.location.href.replace(/\?.*/, '').replace(/ /g, '%20');
+                var remoteFile = window.location.protocol + '//' + window.location.pathname.replace(/
/g, '%20');
                 localFileName = remoteFile.substring(remoteFile.lastIndexOf('/') + 1);
                 var lastProgressEvent = null;
 


Mime
View raw message