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

Inheritance

Constructor

goog.testing.fs.Blob(opt_dataopt_type)

Parameters

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

Instance Methods

Public Protected Private
setDataInternal(data)
Sets the internal contents of the blob. This should only be called by other functions inside the goog.testing.fs namespace.
Arguments:
data : string
The data for this Blob.
code »
slice(opt_startopt_endopt_contentType) !goog.testing.fs.Blob
Creates a blob with bytes of a blob ranging from the optional start parameter up to but not including the optional end parameter, and with a type attribute that is the value of the optional contentType parameter.
Arguments:
opt_start : number=
The start byte offset.
opt_end : number=
The end point of a slice.
opt_contentType : string=
The type of the resulting Blob.
Returns: !goog.testing.fs.Blob  The result blob of the slice operation.
code »
toArrayBuffer() !ArrayBuffer
No description.
Returns: !ArrayBuffer  The string data encapsulated by the blob as an ArrayBuffer.
code »
toDataUrl() string
No description.
Returns: string  The string data encapsulated by the blob as a data: URI.
code »
toString() string
No description.
Returns: string  The string data encapsulated by the blob.
code »

Instance Properties

data_ :
The string data encapsulated by the blob.
Code »
size :
No description.
Code »
type :
No description.
Code »

Package testing.fs

Package Reference