You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/03/11 16:11:06 UTC

[12/50] [abbrv] git commit: Merged deprecated blobWriter fix and fixed tests

Merged deprecated blobWriter fix and fixed tests

Merged pull request from @maxme
Fixed failing tests for changes made
update the creation of a new Blob to include type setting


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/ab19cc4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/ab19cc4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/ab19cc4f

Branch: refs/heads/master
Commit: ab19cc4fa788fb5589ffa04d338e311f68790df9
Parents: c2a7d65
Author: Dan Silivestru <da...@gmail.com>
Authored: Thu Jan 31 14:44:19 2013 -0500
Committer: Dan Silivestru <da...@gmail.com>
Committed: Thu Jan 31 14:44:19 2013 -0500

----------------------------------------------------------------------
 lib/client/platform/cordova/2.0.0/bridge/file.js |    2 +-
 test/unit/client/cordova/file.js                 |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/ab19cc4f/lib/client/platform/cordova/2.0.0/bridge/file.js
----------------------------------------------------------------------
diff --git a/lib/client/platform/cordova/2.0.0/bridge/file.js b/lib/client/platform/cordova/2.0.0/bridge/file.js
index 51cc872..1bace5f 100644
--- a/lib/client/platform/cordova/2.0.0/bridge/file.js
+++ b/lib/client/platform/cordova/2.0.0/bridge/file.js
@@ -247,7 +247,7 @@ module.exports = {
         sourcepath = cleanPath(sourcepath);
 
         // Create a blob for the text to be written
-        blob = new Blob([text]);
+        blob = new Blob([text], {type: "text/plain"});
 
         // Get the FileEntry, create if necessary
         fs.root.getFile(sourcepath, {create: true}, function (entry) {

http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/ab19cc4f/test/unit/client/cordova/file.js
----------------------------------------------------------------------
diff --git a/test/unit/client/cordova/file.js b/test/unit/client/cordova/file.js
index 4c9cf2a..006bc46 100644
--- a/test/unit/client/cordova/file.js
+++ b/test/unit/client/cordova/file.js
@@ -138,6 +138,8 @@ describe("Cordova file bridge", function () {
         });
         window.webkitResolveLocalFileSystemURL = webkitResolveLocalFileSystemURLSpy;
 
+        global.Blob = Blob;
+
         window.WebKitBlobBuilder = function () {
             return {
                 _blobBuffer: "",