testing.fs

Classes

goog.testing.fs.Blob
A mock Blob object. The data is stored as a string.
goog.testing.fs.DirectoryEntry
A mock directory entry object.
goog.testing.fs.Entry
A mock filesystem entry object.
goog.testing.fs.File
A mock file object.
goog.testing.fs.FileEntry
A mock file entry object.
goog.testing.fs.FileReader
A mock FileReader object. This emits the same events as goog.fs.FileReader.
goog.testing.fs.FileSystem
A mock filesystem object.
goog.testing.fs.FileWriter
A mock FileWriter object. This emits the same events as goog.fs.FileSaver and goog.fs.FileWriter.
goog.testing.fs.ProgressEvent
A mock progress event.

Public Protected Private

Global Functions

goog.testing.fs.blobToString(blobopt_encoding) !goog.async.Deferred
Returns the string value of a fake blob.
Arguments:
blob : !goog.testing.fs.Blob
The blob to convert to a string.
opt_encoding : string=
Ignored.
Returns: !goog.async.Deferred  The deferred string value of the blob.
code »
goog.testing.fs.createObjectUrl(blob) string
Create a fake object URL for a given fake blob. This can be used as a real URL, and it can be created and revoked normally.
Arguments:
blob : !goog.testing.fs.Blob
The blob for which to create the URL.
Returns: string  The URL.
code »
goog.testing.fs.getBlob(var_args) !goog.testing.fs.Blob
Concatenates one or more values together and converts them to a fake blob.
Arguments:
var_args : ...(string | !goog.testing.fs.Blob)
The values that will make up the resulting blob.
Returns: !goog.testing.fs.Blob  The blob.
code »
goog.testing.fs.getPersistent(size) !goog.async.Deferred
Get a filesystem object. Since these are mocks, there's no difference between temporary and persistent filesystems.
Arguments:
size : number
Ignored.
Returns: !goog.async.Deferred  The deferred goog.testing.fs.FileSystem.
code »
goog.testing.fs.getTemporary(size) !goog.async.Deferred
Get a filesystem object. Since these are mocks, there's no difference between temporary and persistent filesystems.
Arguments:
size : number
Ignored.
Returns: !goog.async.Deferred  The deferred goog.testing.fs.FileSystem.
code »
goog.testing.fs.install(stubs)
Installs goog.testing.fs in place of the standard goog.fs. After calling this, code that uses goog.fs should work without issue using goog.testing.fs.
Arguments:
stubs : !goog.testing.PropertyReplacer
The property replacer for stubbing out the original goog.fs functions.
code »
goog.testing.fs.isObjectUrlGranted(blob) boolean
Return whether or not a URL has been granted for the given blob.
Arguments:
blob : !goog.testing.fs.Blob
The blob to check.
Returns: boolean  Whether a URL has been granted.
code »
goog.testing.fs.revokeObjectUrl(url)
Remove a URL that was created for a fake blob.
Arguments:
url : string
The URL to revoke.
code »

Global Properties

goog.testing.fs.BlobTest :
No description.
Code »
goog.testing.fs.DirectoryEntryTest :
No description.
Code »
goog.testing.fs.EntryTest :
No description.
Code »
goog.testing.fs.FileEntryTest :
No description.
Code »
goog.testing.fs.FileReaderTest :
No description.
Code »
goog.testing.fs.FileWriterTest :
No description.
Code »
goog.testing.fs.integrationTest :
No description.
Code »
goog.testing.fs.objectUrls_ :
Which object URLs have been granted for fake blobs.
Code »

Package testing

Package Reference