| OLD | NEW |
| 1 Test IndexedDB's IDBIndex.count(). | 1 Test IndexedDB's IDBIndex.count(). |
| 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; | |
| 7 | |
| 8 dbname = "index-count.html" | 6 dbname = "index-count.html" |
| 9 indexedDB.deleteDatabase(dbname) | 7 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 8 indexedDB.open(dbname) |
| 11 store = db.createObjectStore('storeName', null) | 9 store = db.createObjectStore('storeName', null) |
| 12 store.createIndex('indexName', '') | 10 store.createIndex('indexName', '') |
| 13 PASS store.indexNames.contains('indexName') is true | 11 PASS store.indexNames.contains('indexName') is true |
| 14 adding 0 ... 99 | 12 adding 0 ... 99 |
| 15 | 13 |
| 16 verifying count without range | 14 verifying count without range |
| 17 trans = db.transaction('storeName', 'readonly') | 15 trans = db.transaction('storeName', 'readonly') |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 PASS request.result is 0 | 109 PASS request.result is 0 |
| 112 | 110 |
| 113 test = {"key":null,"expected":100} | 111 test = {"key":null,"expected":100} |
| 114 request = index.count(test.key) | 112 request = index.count(test.key) |
| 115 PASS typeof request.result is "number" | 113 PASS typeof request.result is "number" |
| 116 PASS request.result is 100 | 114 PASS request.result is 100 |
| 117 PASS successfullyParsed is true | 115 PASS successfullyParsed is true |
| 118 | 116 |
| 119 TEST COMPLETE | 117 TEST COMPLETE |
| 120 | 118 |
| OLD | NEW |