create helper class to read blob data

This commit is contained in:
deepak1556 2016-08-31 05:38:32 +05:30
parent 5cbc8d5c71
commit 7b85ca0301
12 changed files with 251 additions and 153 deletions

View file

@ -404,19 +404,6 @@ describe('session module', function () {
})
describe('ses.getblobData(identifier, callback)', function () {
it('returns blob data for public url', function (done) {
let data = JSON.stringify({
type: 'blob',
value: 'hello'
})
let blob = new Blob([data], {type: 'application/json'})
let blobURL = URL.createObjectURL(blob)
session.defaultSession.getBlobData(blobURL, function (result) {
assert.equal(result.toString(), data)
done()
})
})
it('returns blob data for uuid', function (done) {
const scheme = 'temp'
const protocol = session.defaultSession.protocol