9 | 9 | Reset storage event list
10 | 10 | storageEventList = new Array()
11 | 11 | storage.setItem('FOO', 'BAR')
12 |  | PASS storageEventList.length is 1
13 |  | PASS storageEventList[0].key is "FOO"
| 12 | FAIL got at least 2, expected only 1 events
| 13 | FAIL storageEventList.length should be 1. Was 2.
| 14 | FAIL storageEventList[0].key should be FOO (of type string). Was null (of type object).
14 | 15 | PASS storageEventList[0].oldValue is null
15 |  | PASS storageEventList[0].newValue is "BAR"
| 16 | FAIL storageEventList[0].newValue should be BAR (of type string). Was null (of type object).
16 | 17 | storage.setItem('FU', 'BAR')
17 | 18 | storage.setItem('a', '1')
18 | 19 | storage.setItem('b', '2')
19 | 20 | storage.setItem('b', '3')
20 |  | PASS storageEventList.length is 5
21 |  | PASS storageEventList[1].key is "FU"
| 21 | FAIL got at least 6, expected only 5 events
| 22 | FAIL storageEventList.length should be 5. Was 6.
| 23 | FAIL storageEventList[1].key should be FU. Was FOO.
22 | 24 | PASS storageEventList[1].oldValue is null
23 | 25 | PASS storageEventList[1].newValue is "BAR"
24 |  | PASS storageEventList[2].key is "a"
| 26 | FAIL storageEventList[2].key should be a. Was FU.
25 | 27 | PASS storageEventList[2].oldValue is null
26 |  | PASS storageEventList[2].newValue is "1"
27 |  | PASS storageEventList[3].key is "b"
| 28 | FAIL storageEventList[2].newValue should be 1. Was BAR.
| 29 | FAIL storageEventList[3].key should be b. Was a.
28 | 30 | PASS storageEventList[3].oldValue is null
29 |  | PASS storageEventList[3].newValue is "2"
| 31 | FAIL storageEventList[3].newValue should be 2. Was 1.
30 | 32 | PASS storageEventList[4].key is "b"
31 |  | PASS storageEventList[4].oldValue is "2"
32 |  | PASS storageEventList[4].newValue is "3"
| 33 | FAIL storageEventList[4].oldValue should be 2 (of type string). Was null (of type object).
| 34 | FAIL storageEventList[4].newValue should be 3. Was 2.
33 | 35 | storage.removeItem('FOO')
34 |  | PASS storageEventList.length is 6
35 |  | PASS storageEventList[5].key is "FOO"
36 |  | PASS storageEventList[5].oldValue is "BAR"
37 |  | PASS storageEventList[5].newValue is null
| 36 | FAIL got at least 7, expected only 6 events
| 37 | FAIL storageEventList.length should be 6. Was 7.
| 38 | FAIL storageEventList[5].key should be FOO. Was b.
| 39 | FAIL storageEventList[5].oldValue should be BAR. Was 2.
| 40 | FAIL storageEventList[5].newValue should be null (of type object). Was 3 (of type string).
38 | 41 | storage.removeItem('FU')
39 |  | PASS storageEventList.length is 7
40 |  | PASS storageEventList[6].key is "FU"
| 42 | FAIL got at least 8, expected only 7 events
| 43 | FAIL storageEventList.length should be 7. Was 8.
| 44 | FAIL storageEventList[6].key should be FU. Was FOO.
41 | 45 | PASS storageEventList[6].oldValue is "BAR"
42 | 46 | PASS storageEventList[6].newValue is null
43 | 47 | storage.clear()
44 |  | PASS storageEventList.length is 8
45 |  | PASS storageEventList[7].key is null
46 |  | PASS storageEventList[7].oldValue is null
| 48 | FAIL got at least 9, expected only 8 events
| 49 | FAIL storageEventList.length should be 8. Was 9.
| 50 | FAIL storageEventList[7].key should be null (of type object). Was FU (of type string).
| 51 | FAIL storageEventList[7].oldValue should be null (of type object). Was BAR (of type string).
47 | 52 | PASS storageEventList[7].newValue is null
48 | 53 |
49 | 54 |