| 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; | 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.
msIndexedDB || self.OIndexedDB; |
| 7 | 7 |
| 8 dbname = "index-count.html" | 8 dbname = "index-count.html" |
| 9 indexedDB.deleteDatabase(dbname) | 9 indexedDB.deleteDatabase(dbname) |
| 10 indexedDB.open(dbname) | 10 indexedDB.open(dbname) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 trans = db.transaction('storeName', 'readonly') | 81 trans = db.transaction('storeName', 'readonly') |
| 82 PASS trans is non-null. | 82 PASS trans is non-null. |
| 83 store = trans.objectStore('storeName') | 83 store = trans.objectStore('storeName') |
| 84 PASS store is non-null. | 84 PASS store is non-null. |
| 85 index = trans.objectStore('storeName').index('indexName') | 85 index = trans.objectStore('storeName').index('indexName') |
| 86 PASS index is non-null. | 86 PASS index is non-null. |
| 87 Expecting exception from index.count(NaN) | 87 Expecting exception from index.count(NaN) |
| 88 PASS Exception was thrown. | 88 PASS Exception was thrown. |
| 89 PASS code is 0 | 89 PASS code is 0 |
| 90 PASS ename is 'DataError' | 90 PASS ename is 'DataError' |
| 91 Exception message: The parameter is not a valid key. | 91 Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not
a valid key. |
| 92 Expecting exception from index.count({}) | 92 Expecting exception from index.count({}) |
| 93 PASS Exception was thrown. | 93 PASS Exception was thrown. |
| 94 PASS code is 0 | 94 PASS code is 0 |
| 95 PASS ename is 'DataError' | 95 PASS ename is 'DataError' |
| 96 Exception message: The parameter is not a valid key. | 96 Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not
a valid key. |
| 97 Expecting exception from index.count(/regex/) | 97 Expecting exception from index.count(/regex/) |
| 98 PASS Exception was thrown. | 98 PASS Exception was thrown. |
| 99 PASS code is 0 | 99 PASS code is 0 |
| 100 PASS ename is 'DataError' | 100 PASS ename is 'DataError' |
| 101 Exception message: The parameter is not a valid key. | 101 Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not
a valid key. |
| 102 | 102 |
| 103 test = {"key":0,"expected":1} | 103 test = {"key":0,"expected":1} |
| 104 request = index.count(test.key) | 104 request = index.count(test.key) |
| 105 PASS typeof request.result is "number" | 105 PASS typeof request.result is "number" |
| 106 PASS request.result is 1 | 106 PASS request.result is 1 |
| 107 | 107 |
| 108 test = {"key":100,"expected":0} | 108 test = {"key":100,"expected":0} |
| 109 request = index.count(test.key) | 109 request = index.count(test.key) |
| 110 PASS typeof request.result is "number" | 110 PASS typeof request.result is "number" |
| 111 PASS request.result is 0 | 111 PASS request.result is 0 |
| 112 | 112 |
| 113 test = {"key":null,"expected":100} | 113 test = {"key":null,"expected":100} |
| 114 request = index.count(test.key) | 114 request = index.count(test.key) |
| 115 PASS typeof request.result is "number" | 115 PASS typeof request.result is "number" |
| 116 PASS request.result is 100 | 116 PASS request.result is 100 |
| 117 PASS successfullyParsed is true | 117 PASS successfullyParsed is true |
| 118 | 118 |
| 119 TEST COMPLETE | 119 TEST COMPLETE |
| 120 | 120 |
| OLD | NEW |