Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Merged deprecated blobWriter fix and fixed tests
Browse files Browse the repository at this point in the history
Merged pull request from @maxme
Fixed failing tests for changes made
update the creation of a new Blob to include type setting
  • Loading branch information
dansilivestru committed Jan 31, 2013
1 parent c2a7d65 commit ab19cc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/platform/cordova/2.0.0/bridge/file.js
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions test/unit/client/cordova/file.js
Expand Up @@ -138,6 +138,8 @@ describe("Cordova file bridge", function () {
});
window.webkitResolveLocalFileSystemURL = webkitResolveLocalFileSystemURLSpy;

global.Blob = Blob;

window.WebKitBlobBuilder = function () {
return {
_blobBuffer: "",
Expand Down

1 comment on commit ab19cc4

@dansilivestru
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And by BlobWriter... I mean BlobBuilder

Please sign in to comment.