incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [1/3] spec commit: Remove test for null values in header map.
Date Sat, 28 Jul 2012 00:47:03 GMT
Updated Branches:
  refs/heads/master a8a95ea67 -> acbd72fd3


Remove test for null values in header map.

It is awkward to implment on Android and doesn't actually clobber
system-level headers anyways.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/acbd72fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/acbd72fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/acbd72fd

Branch: refs/heads/master
Commit: acbd72fd3d338810ee2b7fab64035c8d9463d1f3
Parents: c101ed2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Jul 16 13:15:51 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Jul 27 20:42:55 2012 -0400

----------------------------------------------------------------------
 autotest/tests/filetransfer.tests.js |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/acbd72fd/autotest/tests/filetransfer.tests.js
----------------------------------------------------------------------
diff --git a/autotest/tests/filetransfer.tests.js b/autotest/tests/filetransfer.tests.js
index 5f8304d..ef67bdb 100644
--- a/autotest/tests/filetransfer.tests.js
+++ b/autotest/tests/filetransfer.tests.js
@@ -220,7 +220,9 @@ describe('FileTransfer', function() {
 
         it("should be able to upload a file", function() {
             var fail = jasmine.createSpy();
-            var uploadFail = jasmine.createSpy();
+            var uploadFail = function() {
+                expect(false).toBe(true, "Ensure " + remoteFile + " is in the white list");
+            };
 
             var remoteFile = server + "/upload";
             var localFileName = "upload.txt";
@@ -257,7 +259,6 @@ describe('FileTransfer', function() {
 
             runs(function() {
                 expect(uploadWin).toHaveBeenCalled();
-                expect(uploadFail).not.toHaveBeenCalled();
                 expect(fail).not.toHaveBeenCalled();
             });
         });
@@ -408,7 +409,7 @@ describe('FileTransfer', function() {
 
             var fileFail = function() {};
             var uploadFail = function() {
-                expect(false).toBe(true, "Ensure " + remoteFile + " is in the white list");
+                expect(false).toBe(true, "Ensure " + remoteFile + " is in the white list
and that Content-Length header is being set.");
             };
 
             var uploadWin = jasmine.createSpy().andCallFake(function(uploadResult) {
@@ -419,7 +420,6 @@ describe('FileTransfer', function() {
                 var responseHtml = decodeURIComponent(uploadResult.response);
                 expect(responseHtml).toMatch(/CustomHeader1[\s\S]*CustomValue1/i);
                 expect(responseHtml).toMatch(/CustomHeader2[\s\S]*CustomValue2[\s\S]*CustomValue3/i,
"Should allow array values");
-                expect(responseHtml).not.toMatch(/X-Requested-With/i, "Should hot have sent
User-Agent header");
             });
 
             var fileWin = function(fileEntry) {
@@ -437,7 +437,6 @@ describe('FileTransfer', function() {
                 options.headers = {
                     "CustomHeader1": "CustomValue1",
                     "CustomHeader2": ["CustomValue2", "CustomValue3"],
-                    "X-Requested-With": null  // Removes the header.
                 };
 
                 // removing options cause Android to timeout


Mime
View raw message