You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/05/08 19:53:15 UTC

spec commit: CB-3440 [BlackBerry10] Add platform specific logic to file-transfer tests

Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master 49ecd9d00 -> 9c8e366c2


CB-3440 [BlackBerry10] Add platform specific logic to file-transfer tests

- BB10 uses local:/// rather than file:///
- BB10 does not support progress on gzip encoded requests


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

Branch: refs/heads/master
Commit: 9c8e366c24b6bfd661f0d50b9bc2f7d9049c48b7
Parents: 49ecd9d
Author: Bryan Higgins <bh...@blackberry.com>
Authored: Thu May 8 13:50:55 2014 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Thu May 8 13:52:56 2014 -0400

----------------------------------------------------------------------
 autotest/tests/filetransfer.tests.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/9c8e366c/autotest/tests/filetransfer.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/filetransfer.tests.js b/autotest/tests/filetransfer.tests.js
index 16ae271..dc95513 100644
--- a/autotest/tests/filetransfer.tests.js
+++ b/autotest/tests/filetransfer.tests.js
@@ -198,7 +198,7 @@ describe('FileTransfer', function() {
             var localFileName = remoteFile.substring(remoteFile.lastIndexOf('/')+1);
             var lastProgressEvent = null;
 
-            if (!/^file/.exec(remoteFile)) {
+            if (!/^file/.exec(remoteFile) && cordova.platformId !== 'blackberry10') {
                 expect(remoteFile).toMatch(/^file:/);
                 return;
             }
@@ -415,6 +415,12 @@ describe('FileTransfer', function() {
             waitsForAny(downloadWin, downloadFail);
         });
         it("filetransfer.spec.17 progress should work with gzip encoding", function() {
+
+           //lengthComputable false on bb10 when downloading gzip 
+           if (cordova.platformId === 'blackberry10') {
+                return;
+           }
+
            var downloadFail = createDoNotCallSpy('downloadFail');
            var remoteFile = "http://www.apache.org/";
            var localFileName = "index.html";