storage.mechanism.MockThrowableStorage Extends
A minimal WebStorage implementation that throws exceptions for disabled storage. Since we cannot have unit tests running in Safari private mode to test this, we need to mock an exception throwing when trying to set a value.

Inheritance

Constructor

goog.storage.mechanism.MockThrowableStorage(opt_isStorageDisabled)

Parameters

opt_isStorageDisabled : boolean=
If true, throws exceptions emulating Private browsing mode. If false, storage quota will be marked as exceeded.

Instance Methods

Public Protected Private
key(index) string
A very simple, dummy implementation of key(), merely to verify that calls to HTML5WebStorage#key are proxied through.
Arguments:
index : number
A key index.
Returns: string  The key associated with that index.
code »
removeItem()
No description.
code »
setItem()
No description.
code »

Instance Properties

isStorageDisabled_ :
No description.
Code »
length :
No description.
Code »

Package storage.mechanism

Package Reference