OLD | NEW |
1 Test IndexedDB deleting an object store | 1 Test IndexedDB deleting an object store |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
7 | 7 |
8 dbname = "remove-objectstore.html" | 8 dbname = "remove-objectstore.html" |
9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 request = objectStore.add({foo: i}); | 105 request = objectStore.add({foo: i}); |
106 request = objectStore.add({foo: i}); | 106 request = objectStore.add({foo: i}); |
107 request = objectStore.add({foo: i}); | 107 request = objectStore.add({foo: i}); |
108 request = objectStore.add({foo: i}); | 108 request = objectStore.add({foo: i}); |
109 request = objectStore.add({foo: i}); | 109 request = objectStore.add({foo: i}); |
110 request = objectStore.add({foo: i}); | 110 request = objectStore.add({foo: i}); |
111 request = objectStore.add({foo: i}); | 111 request = objectStore.add({foo: i}); |
112 request = objectStore.add({foo: i}); | 112 request = objectStore.add({foo: i}); |
113 request = objectStore.add({foo: i}); | 113 request = objectStore.add({foo: i}); |
114 PASS db.objectStoreNames.length is 1 | 114 PASS db.objectStoreNames.length is 1 |
115 PASS db.objectStoreNames.item(0) is objectStoreName | 115 PASS db.objectStoreNames[0] is objectStoreName |
116 db.close() | 116 db.close() |
117 request = indexedDB.open(dbname, 2) | 117 request = indexedDB.open(dbname, 2) |
118 db.deleteObjectStore(objectStore.name); | 118 db.deleteObjectStore(objectStore.name); |
119 PASS db.objectStoreNames.length is 0 | 119 PASS db.objectStoreNames.length is 0 |
120 objectStore = db.createObjectStore(objectStoreName, { keyPath: 'foo' }); | 120 objectStore = db.createObjectStore(objectStoreName, { keyPath: 'foo' }); |
121 PASS db.objectStoreNames.length is 1 | 121 PASS db.objectStoreNames.length is 1 |
122 PASS db.objectStoreNames.item(0) is objectStoreName | 122 PASS db.objectStoreNames[0] is objectStoreName |
123 request = objectStore.openCursor(); | 123 request = objectStore.openCursor(); |
124 PASS event.target.result is null | 124 PASS event.target.result is null |
125 db.deleteObjectStore(objectStore.name); | 125 db.deleteObjectStore(objectStore.name); |
126 PASS db.objectStoreNames.length is 0 | 126 PASS db.objectStoreNames.length is 0 |
127 db.close() | 127 db.close() |
128 request = indexedDB.open(dbname, 3) | 128 request = indexedDB.open(dbname, 3) |
129 objectStore = db.createObjectStore(objectStoreName, { keyPath: 'foo' }); | 129 objectStore = db.createObjectStore(objectStoreName, { keyPath: 'foo' }); |
130 request = objectStore.add({foo:'bar'}); | 130 request = objectStore.add({foo:'bar'}); |
131 db.deleteObjectStore(objectStoreName); | 131 db.deleteObjectStore(objectStoreName); |
132 PASS successfullyParsed is true | 132 PASS successfullyParsed is true |
133 | 133 |
134 TEST COMPLETE | 134 TEST COMPLETE |
135 | 135 |
OLD | NEW |