1This is a test to make sure DOM Storage mutations fire StorageEvents that are caught by the event listener specified as an attribute on the body. 2 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6Testing sessionStorage 7storage.clear() 8PASS storage.length is 0 9iframe.onload = step1 10iframe.src = 'resources/body-event-handler.html' 11Reset storage event list 12storageEventList = new Array() 13storage.setItem('FOO', 'BAR') 14PASS storageEventList.length is 1 15PASS storageEventList[0].key is "FOO" 16PASS storageEventList[0].oldValue is null 17PASS storageEventList[0].newValue is "BAR" 18storage.setItem('FU', 'BAR') 19storage.setItem('a', '1') 20storage.setItem('b', '2') 21storage.setItem('b', '3') 22PASS storageEventList.length is 5 23PASS storageEventList[1].key is "FU" 24PASS storageEventList[1].oldValue is null 25PASS storageEventList[1].newValue is "BAR" 26PASS storageEventList[2].key is "a" 27PASS storageEventList[2].oldValue is null 28PASS storageEventList[2].newValue is "1" 29PASS storageEventList[3].key is "b" 30PASS storageEventList[3].oldValue is null 31PASS storageEventList[3].newValue is "2" 32PASS storageEventList[4].key is "b" 33PASS storageEventList[4].oldValue is "2" 34PASS storageEventList[4].newValue is "3" 35storage.removeItem('FOO') 36PASS storageEventList.length is 6 37PASS storageEventList[5].key is "FOO" 38PASS storageEventList[5].oldValue is "BAR" 39PASS storageEventList[5].newValue is null 40storage.removeItem('FU') 41PASS storageEventList.length is 7 42PASS storageEventList[6].key is "FU" 43PASS storageEventList[6].oldValue is "BAR" 44PASS storageEventList[6].newValue is null 45storage.clear() 46PASS storageEventList.length is 8 47PASS storageEventList[7].key is null 48PASS storageEventList[7].oldValue is null 49PASS storageEventList[7].newValue is null 50 51 52Testing localStorage 53storage.clear() 54PASS storage.length is 0 55iframe.onload = step1 56iframe.src = 'resources/body-event-handler.html' 57Reset storage event list 58storageEventList = new Array() 59storage.setItem('FOO', 'BAR') 60PASS storageEventList.length is 1 61PASS storageEventList[0].key is "FOO" 62PASS storageEventList[0].oldValue is null 63PASS storageEventList[0].newValue is "BAR" 64storage.setItem('FU', 'BAR') 65storage.setItem('a', '1') 66storage.setItem('b', '2') 67storage.setItem('b', '3') 68PASS storageEventList.length is 5 69PASS storageEventList[1].key is "FU" 70PASS storageEventList[1].oldValue is null 71PASS storageEventList[1].newValue is "BAR" 72PASS storageEventList[2].key is "a" 73PASS storageEventList[2].oldValue is null 74PASS storageEventList[2].newValue is "1" 75PASS storageEventList[3].key is "b" 76PASS storageEventList[3].oldValue is null 77PASS storageEventList[3].newValue is "2" 78PASS storageEventList[4].key is "b" 79PASS storageEventList[4].oldValue is "2" 80PASS storageEventList[4].newValue is "3" 81storage.removeItem('FOO') 82PASS storageEventList.length is 6 83PASS storageEventList[5].key is "FOO" 84PASS storageEventList[5].oldValue is "BAR" 85PASS storageEventList[5].newValue is null 86storage.removeItem('FU') 87PASS storageEventList.length is 7 88PASS storageEventList[6].key is "FU" 89PASS storageEventList[6].oldValue is "BAR" 90PASS storageEventList[6].newValue is null 91storage.clear() 92PASS storageEventList.length is 8 93PASS storageEventList[7].key is null 94PASS storageEventList[7].oldValue is null 95PASS storageEventList[7].newValue is null 96 97 98PASS successfullyParsed is true 99 100TEST COMPLETE 101 102 103