goog.testing.MockStorage
Classgoog.testing.MockStorage()
A JS storage instance, implementing the HMTL5 Storage interface. See http://www.w3.org/TR/webstorage/ for details.
.clear()
Clears the storage.
.getItem(key)
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
{string
}
string
}
.key(index)
Returns the key at the given index.
index
{number
}
string
}
.length
{number
}The number of elements in the storage.
.removeItem(key)
Removes and item from the storage.
key
{string
}
.setItem(key, value)
Sets an item to the storage.
key
{string
}
value
{*}