The goog.testing.fs.Blob Class

goog.testing.fs.Blob(opt_data, opt_type)

A mock Blob object. The data is stored as a string.

opt_data {string=}
The string data encapsulated by the blob.
opt_type {string=}
The mime type of the blob.

.setDataInternal(data)

Sets the internal contents of the blob. This should only be called by other functions inside the {@code goog.testing.fs} namespace.

data {string}
The data for this Blob.

.size {number}

@see
http://www.w3.org/TR/FileAPI/#dfn-size

.slice(start, length, opt_contentType)

start {number}
The start byte offset.
length {number}
The number of bytes to slice.
opt_contentType {string=}
The type of the resulting Blob.
returns {!goog.testing.fs.Blob}
The result of the slice operation.
@see
http://www.w3.org/TR/FileAPI/#dfn-slice

.toArrayBuffer()

returns {ArrayBuffer}
The string data encapsulated by the blob as an ArrayBuffer.

.toDataUrl()

returns {string}
The string data encapsulated by the blob as a data: URI.

.toString()

returns {string}
The string data encapsulated by the blob.

.type {string}

@see
http://www.w3.org/TR/FileAPI/#dfn-type