Home | History | Annotate | Download | only in dom_storage

Lines Matching refs:storage

21 function sanityCheck(storage) {
22 storage.clear();
24 checkEqual(0, storage.length,
25 "storage.length != 0 at start");
26 checkEqual(null, storage.getItem("foo"),
28 checkEqual(null, storage.key(0),
31 storage.setItem("foo", "bar");
33 checkEqual(1, storage.length,
34 "storage.length != 1 after addition");
35 checkEqual("bar", storage.getItem("foo"),
37 checkEqual("foo", storage.key(0),
40 storage.removeItem("foo");
42 checkEqual(null, storage.getItem("foo"),
45 storage["foo"] = "baz";
46 storage["name"] = "value";
48 checkEqual(2, storage.length,
49 "storage.length != 2 after 2 additions");
50 checkEqual("baz", storage["foo"],
51 "storage['foo'] != 'baz' after addition");
52 checkEqual("value", storage["name"],
53 "storage['name'] != 'value' after addition");
55 storage.clear();
57 checkEqual(0, storage.length,
58 "storage.length != 0 after clear");
62 storage.setItem("tooLarge", tooLarge);
69 storage.setItem(tooLarge, "key is too large");