Home

# Class goog.testing.MockStorage

A JS storage instance, implementing the HMTL5 Storage interface. See http://www.w3.org/TR/webstorage/ for details.

Instance Method Summary
| `clear()` Clears the storage.
| `getItem(string key) ⇒ ?string` Gets an item from the storage. The item returned is the "structured clone" of the value from setItem. In practice this means it's the value cast to a string.
| `key(number index) ⇒ ?string` Returns the key at the given index.
| `removeItem(string key)` Removes and item from the storage.
| `setItem(string key, <Any Type> value)` Sets an item to the storage.