OLD | NEW |
1 [Worker] Test the basics of IndexedDB's IDBObjectStore. | 1 [Worker] Test the basics of IndexedDB's IDBObjectStore. |
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 Starting worker: resources/objectstore-basics.js | 6 Starting worker: resources/objectstore-basics.js |
7 [Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB
|| self.msIndexedDB || self.OIndexedDB; | 7 [Worker] indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB
|| self.msIndexedDB || self.OIndexedDB; |
8 [Worker] | 8 [Worker] |
9 [Worker] dbname = "objectstore-basics.js" | 9 [Worker] dbname = "objectstore-basics.js" |
10 [Worker] indexedDB.deleteDatabase(dbname) | 10 [Worker] indexedDB.deleteDatabase(dbname) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 PASS [Worker] store.autoIncrement is false | 43 PASS [Worker] store.autoIncrement is false |
44 PASS [Worker] storeNames.contains('storeName') is true | 44 PASS [Worker] storeNames.contains('storeName') is true |
45 PASS [Worker] storeNames.length is 1 | 45 PASS [Worker] storeNames.length is 1 |
46 PASS [Worker] db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPat
h is "path" | 46 PASS [Worker] db.createObjectStore('storeWithKeyPath', {keyPath: 'path'}).keyPat
h is "path" |
47 PASS [Worker] db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true
}).autoIncrement is true | 47 PASS [Worker] db.createObjectStore('storeWithKeyGenerator', {autoIncrement: true
}).autoIncrement is true |
48 [Worker] Ask for an index that doesn't exist: | 48 [Worker] Ask for an index that doesn't exist: |
49 [Worker] Expecting exception from store.index('asdf') | 49 [Worker] Expecting exception from store.index('asdf') |
50 PASS [Worker] Exception was thrown. | 50 PASS [Worker] Exception was thrown. |
51 PASS [Worker] code is DOMException.NOT_FOUND_ERR | 51 PASS [Worker] code is DOMException.NOT_FOUND_ERR |
52 PASS [Worker] ename is 'NotFoundError' | 52 PASS [Worker] ename is 'NotFoundError' |
| 53 [Worker] Exception message: The specified index was not found. |
53 [Worker] createIndex(): | 54 [Worker] createIndex(): |
54 [Worker] index = store.createIndex('indexName', 'x', {unique: true}) | 55 [Worker] index = store.createIndex('indexName', 'x', {unique: true}) |
55 PASS [Worker] index is non-null. | 56 PASS [Worker] index is non-null. |
56 PASS [Worker] store.indexNames.contains('indexName') is true | 57 PASS [Worker] store.indexNames.contains('indexName') is true |
57 [Worker] index = store.index('indexName') | 58 [Worker] index = store.index('indexName') |
58 PASS [Worker] index is non-null. | 59 PASS [Worker] index is non-null. |
59 [Worker] Ask for an index that doesn't exist: | 60 [Worker] Ask for an index that doesn't exist: |
60 [Worker] Expecting exception from store.index('asdf') | 61 [Worker] Expecting exception from store.index('asdf') |
61 PASS [Worker] Exception was thrown. | 62 PASS [Worker] Exception was thrown. |
62 PASS [Worker] code is DOMException.NOT_FOUND_ERR | 63 PASS [Worker] code is DOMException.NOT_FOUND_ERR |
63 PASS [Worker] ename is 'NotFoundError' | 64 PASS [Worker] ename is 'NotFoundError' |
| 65 [Worker] Exception message: The specified index was not found. |
64 [Worker] indexedDB.open(dbname, 2) | 66 [Worker] indexedDB.open(dbname, 2) |
65 [Worker] db.close() | 67 [Worker] db.close() |
66 PASS [Worker] db.version is 2 | 68 PASS [Worker] db.version is 2 |
67 [Worker] setVersionTrans = event.target.transaction | 69 [Worker] setVersionTrans = event.target.transaction |
68 PASS [Worker] setVersionTrans is non-null. | 70 PASS [Worker] setVersionTrans is non-null. |
69 [Worker] store = setVersionTrans.objectStore('storeName') | 71 [Worker] store = setVersionTrans.objectStore('storeName') |
70 [Worker] index = store.createIndex('indexFail', 'x') | 72 [Worker] index = store.createIndex('indexFail', 'x') |
71 PASS [Worker] db.version is 1 | 73 PASS [Worker] db.version is 1 |
72 PASS [Worker] store.transaction is setVersionTrans | 74 PASS [Worker] store.transaction is setVersionTrans |
73 PASS [Worker] store.indexNames is ['indexName'] | 75 PASS [Worker] store.indexNames is ['indexName'] |
(...skipping 13 matching lines...) Expand all Loading... |
87 [Worker] addData(): | 89 [Worker] addData(): |
88 [Worker] db = event.target.result | 90 [Worker] db = event.target.result |
89 [Worker] transaction = db.transaction(['storeName'], 'readwrite') | 91 [Worker] transaction = db.transaction(['storeName'], 'readwrite') |
90 [Worker] store = transaction.objectStore('storeName') | 92 [Worker] store = transaction.objectStore('storeName') |
91 [Worker] Try to insert data with a Date key: | 93 [Worker] Try to insert data with a Date key: |
92 [Worker] store.add({x: 'foo'}, testDate) | 94 [Worker] store.add({x: 'foo'}, testDate) |
93 [Worker] Try to insert a value not handled by structured clone: | 95 [Worker] Try to insert a value not handled by structured clone: |
94 [Worker] Expecting exception from store.add({x: 'bar', y: self}, 'bar') | 96 [Worker] Expecting exception from store.add({x: 'bar', y: self}, 'bar') |
95 PASS [Worker] Exception was thrown. | 97 PASS [Worker] Exception was thrown. |
96 PASS [Worker] code is DOMException.DATA_CLONE_ERR | 98 PASS [Worker] code is DOMException.DATA_CLONE_ERR |
| 99 [Worker] Exception message: An object could not be cloned. |
97 [Worker] Try to insert data where key path yields a Date key: | 100 [Worker] Try to insert data where key path yields a Date key: |
98 [Worker] store.add({x: testDateB, y: 'value'}, 'key') | 101 [Worker] store.add({x: testDateB, y: 'value'}, 'key') |
99 [Worker] addSuccess(): | 102 [Worker] addSuccess(): |
100 PASS [Worker] event.target.result is "key" | 103 PASS [Worker] event.target.result is "key" |
101 [Worker] event.target.source.add({x: 'foo'}, 'zzz') | 104 [Worker] event.target.source.add({x: 'foo'}, 'zzz') |
102 [Worker] addAgainFailure(): | 105 [Worker] addAgainFailure(): |
103 PASS [Worker] event.target.error.name is 'ConstraintError' | 106 PASS [Worker] event.target.error.name is 'ConstraintError' |
104 [Worker] event.preventDefault() | 107 [Worker] event.preventDefault() |
105 [Worker] db.transaction(['storeName'], 'readwrite') | 108 [Worker] db.transaction(['storeName'], 'readwrite') |
106 [Worker] store = transaction.objectStore('storeName') | 109 [Worker] store = transaction.objectStore('storeName') |
107 [Worker] store.add({x: 'somevalue'}, 'somekey') | 110 [Worker] store.add({x: 'somevalue'}, 'somekey') |
108 [Worker] Expecting exception from store.add({x: 'othervalue'}, null) | 111 [Worker] Expecting exception from store.add({x: 'othervalue'}, null) |
109 PASS [Worker] Exception was thrown. | 112 PASS [Worker] Exception was thrown. |
110 PASS [Worker] code is 0 | 113 PASS [Worker] code is 0 |
111 PASS [Worker] ename is 'DataError' | 114 PASS [Worker] ename is 'DataError' |
| 115 [Worker] Exception message: The parameter is not a valid key. |
112 [Worker] db.transaction(['storeName'], 'readwrite') | 116 [Worker] db.transaction(['storeName'], 'readwrite') |
113 [Worker] store = transaction.objectStore('storeName') | 117 [Worker] store = transaction.objectStore('storeName') |
114 [Worker] Ensure invalid key pointed at by index keyPath is ignored | 118 [Worker] Ensure invalid key pointed at by index keyPath is ignored |
115 [Worker] store.add({x: null}, 'validkey') | 119 [Worker] store.add({x: null}, 'validkey') |
116 [Worker] db.transaction(['storeName'], 'readwrite') | 120 [Worker] db.transaction(['storeName'], 'readwrite') |
117 [Worker] store = transaction.objectStore('storeName') | 121 [Worker] store = transaction.objectStore('storeName') |
118 [Worker] store.get('key') | 122 [Worker] store.get('key') |
119 [Worker] getSuccess(): | 123 [Worker] getSuccess(): |
120 PASS [Worker] event.target.result.y is "value" | 124 PASS [Worker] event.target.result.y is "value" |
121 [Worker] store = event.target.source | 125 [Worker] store = event.target.source |
122 [Worker] store.get(testDate) | 126 [Worker] store.get(testDate) |
123 [Worker] getSuccessDateKey(): | 127 [Worker] getSuccessDateKey(): |
124 PASS [Worker] event.target.result.x is "foo" | 128 PASS [Worker] event.target.result.x is "foo" |
125 [Worker] store.delete('key') | 129 [Worker] store.delete('key') |
126 [Worker] removeSuccess(): | 130 [Worker] removeSuccess(): |
127 PASS [Worker] event.target.result is undefined | 131 PASS [Worker] event.target.result is undefined |
128 [Worker] store.delete('key') | 132 [Worker] store.delete('key') |
129 [Worker] removeSuccessButNotThere(): | 133 [Worker] removeSuccessButNotThere(): |
130 PASS [Worker] event.target.result is undefined | 134 PASS [Worker] event.target.result is undefined |
131 [Worker] store = event.target.source | 135 [Worker] store = event.target.source |
132 [Worker] Passing an invalid key into store.get(). | 136 [Worker] Passing an invalid key into store.get(). |
133 [Worker] Expecting exception from store.get({}) | 137 [Worker] Expecting exception from store.get({}) |
134 PASS [Worker] Exception was thrown. | 138 PASS [Worker] Exception was thrown. |
135 PASS [Worker] code is 0 | 139 PASS [Worker] code is 0 |
136 PASS [Worker] ename is 'DataError' | 140 PASS [Worker] ename is 'DataError' |
| 141 [Worker] Exception message: The parameter is not a valid key. |
137 [Worker] Passing an invalid key into store.delete(). | 142 [Worker] Passing an invalid key into store.delete(). |
138 [Worker] Expecting exception from store.delete({}) | 143 [Worker] Expecting exception from store.delete({}) |
139 PASS [Worker] Exception was thrown. | 144 PASS [Worker] Exception was thrown. |
140 PASS [Worker] code is 0 | 145 PASS [Worker] code is 0 |
141 PASS [Worker] ename is 'DataError' | 146 PASS [Worker] ename is 'DataError' |
| 147 [Worker] Exception message: The parameter is not a valid key. |
142 [Worker] Passing an invalid key into store.add(). | 148 [Worker] Passing an invalid key into store.add(). |
143 [Worker] Expecting exception from store.add(null, {}) | 149 [Worker] Expecting exception from store.add(null, {}) |
144 PASS [Worker] Exception was thrown. | 150 PASS [Worker] Exception was thrown. |
145 PASS [Worker] code is 0 | 151 PASS [Worker] code is 0 |
146 PASS [Worker] ename is 'DataError' | 152 PASS [Worker] ename is 'DataError' |
| 153 [Worker] Exception message: The parameter is not a valid key. |
147 [Worker] Passing an invalid key into store.put(). | 154 [Worker] Passing an invalid key into store.put(). |
148 [Worker] Expecting exception from store.put(null, {}) | 155 [Worker] Expecting exception from store.put(null, {}) |
149 PASS [Worker] Exception was thrown. | 156 PASS [Worker] Exception was thrown. |
150 PASS [Worker] code is 0 | 157 PASS [Worker] code is 0 |
151 PASS [Worker] ename is 'DataError' | 158 PASS [Worker] ename is 'DataError' |
| 159 [Worker] Exception message: The parameter is not a valid key. |
152 [Worker] | 160 [Worker] |
153 [Worker] testPreConditions(): | 161 [Worker] testPreConditions(): |
154 [Worker] indexedDB.open(dbname, 3) | 162 [Worker] indexedDB.open(dbname, 3) |
155 [Worker] | 163 [Worker] |
156 [Worker] upgradeNeeded(): | 164 [Worker] upgradeNeeded(): |
157 [Worker] storeWithInLineKeys = db.createObjectStore('storeWithInLineKeys', {keyP
ath: 'key'}) | 165 [Worker] storeWithInLineKeys = db.createObjectStore('storeWithInLineKeys', {keyP
ath: 'key'}) |
158 [Worker] storeWithOutOfLineKeys = db.createObjectStore('storeWithOutIOfLineKeys'
) | 166 [Worker] storeWithOutOfLineKeys = db.createObjectStore('storeWithOutIOfLineKeys'
) |
159 [Worker] storeWithIndex = db.createObjectStore('storeWithIndex') | 167 [Worker] storeWithIndex = db.createObjectStore('storeWithIndex') |
160 [Worker] index = storeWithIndex.createIndex('indexName', 'indexKey') | 168 [Worker] index = storeWithIndex.createIndex('indexName', 'indexKey') |
161 [Worker] | 169 [Worker] |
162 [Worker] IDBObjectStore.put() | 170 [Worker] IDBObjectStore.put() |
163 [Worker] The object store uses in-line keys and the key parameter was provided. | 171 [Worker] The object store uses in-line keys and the key parameter was provided. |
164 [Worker] Expecting exception from storeWithInLineKeys.put({key: 1}, 'key') | 172 [Worker] Expecting exception from storeWithInLineKeys.put({key: 1}, 'key') |
165 PASS [Worker] Exception was thrown. | 173 PASS [Worker] Exception was thrown. |
166 PASS [Worker] code is 0 | 174 PASS [Worker] code is 0 |
167 PASS [Worker] ename is 'DataError' | 175 PASS [Worker] ename is 'DataError' |
| 176 [Worker] Exception message: The object store uses in-line keys and the key param
eter was provided. |
168 [Worker] The object store uses out-of-line keys and has no key generator and the
key parameter was not provided. | 177 [Worker] The object store uses out-of-line keys and has no key generator and the
key parameter was not provided. |
169 [Worker] Expecting exception from storeWithOutOfLineKeys.put({}) | 178 [Worker] Expecting exception from storeWithOutOfLineKeys.put({}) |
170 PASS [Worker] Exception was thrown. | 179 PASS [Worker] Exception was thrown. |
171 PASS [Worker] code is 0 | 180 PASS [Worker] code is 0 |
172 PASS [Worker] ename is 'DataError' | 181 PASS [Worker] ename is 'DataError' |
| 182 [Worker] Exception message: The object store uses out-of-line keys and has no ke
y generator and the key parameter was not provided. |
173 [Worker] The object store uses in-line keys and the result of evaluating the obj
ect store's key path yields a value and that value is not a valid key. | 183 [Worker] The object store uses in-line keys and the result of evaluating the obj
ect store's key path yields a value and that value is not a valid key. |
174 [Worker] Expecting exception from storeWithInLineKeys.put({key: null}) | 184 [Worker] Expecting exception from storeWithInLineKeys.put({key: null}) |
175 PASS [Worker] Exception was thrown. | 185 PASS [Worker] Exception was thrown. |
176 PASS [Worker] code is 0 | 186 PASS [Worker] code is 0 |
177 PASS [Worker] ename is 'DataError' | 187 PASS [Worker] ename is 'DataError' |
| 188 [Worker] Exception message: Evaluating the object store's key path yielded a val
ue that is not a valid key. |
178 [Worker] The object store uses in-line keys but no key generator and the result
of evaluating the object store's key path does not yield a value. | 189 [Worker] The object store uses in-line keys but no key generator and the result
of evaluating the object store's key path does not yield a value. |
179 [Worker] Expecting exception from storeWithInLineKeys.put({}) | 190 [Worker] Expecting exception from storeWithInLineKeys.put({}) |
180 PASS [Worker] Exception was thrown. | 191 PASS [Worker] Exception was thrown. |
181 PASS [Worker] code is 0 | 192 PASS [Worker] code is 0 |
182 PASS [Worker] ename is 'DataError' | 193 PASS [Worker] ename is 'DataError' |
| 194 [Worker] Exception message: Evaluating the object store's key path did not yield
a value. |
183 [Worker] The key parameter was provided but does not contain a valid key. | 195 [Worker] The key parameter was provided but does not contain a valid key. |
184 [Worker] Expecting exception from storeWithOutOfLineKeys.put({}, null) | 196 [Worker] Expecting exception from storeWithOutOfLineKeys.put({}, null) |
185 PASS [Worker] Exception was thrown. | 197 PASS [Worker] Exception was thrown. |
186 PASS [Worker] code is 0 | 198 PASS [Worker] code is 0 |
187 PASS [Worker] ename is 'DataError' | 199 PASS [Worker] ename is 'DataError' |
| 200 [Worker] Exception message: The parameter is not a valid key. |
188 [Worker] | 201 [Worker] |
189 [Worker] IDBObjectStore.add() | 202 [Worker] IDBObjectStore.add() |
190 [Worker] The object store uses in-line keys and the key parameter was provided. | 203 [Worker] The object store uses in-line keys and the key parameter was provided. |
191 [Worker] Expecting exception from storeWithInLineKeys.add({key: 1}, 'key') | 204 [Worker] Expecting exception from storeWithInLineKeys.add({key: 1}, 'key') |
192 PASS [Worker] Exception was thrown. | 205 PASS [Worker] Exception was thrown. |
193 PASS [Worker] code is 0 | 206 PASS [Worker] code is 0 |
194 PASS [Worker] ename is 'DataError' | 207 PASS [Worker] ename is 'DataError' |
| 208 [Worker] Exception message: The object store uses in-line keys and the key param
eter was provided. |
195 [Worker] The object store uses out-of-line keys and has no key generator and the
key parameter was not provided. | 209 [Worker] The object store uses out-of-line keys and has no key generator and the
key parameter was not provided. |
196 [Worker] Expecting exception from storeWithOutOfLineKeys.add({}) | 210 [Worker] Expecting exception from storeWithOutOfLineKeys.add({}) |
197 PASS [Worker] Exception was thrown. | 211 PASS [Worker] Exception was thrown. |
198 PASS [Worker] code is 0 | 212 PASS [Worker] code is 0 |
199 PASS [Worker] ename is 'DataError' | 213 PASS [Worker] ename is 'DataError' |
| 214 [Worker] Exception message: The object store uses out-of-line keys and has no ke
y generator and the key parameter was not provided. |
200 [Worker] The object store uses in-line keys and the result of evaluating the obj
ect store's key path yields a value and that value is not a valid key. | 215 [Worker] The object store uses in-line keys and the result of evaluating the obj
ect store's key path yields a value and that value is not a valid key. |
201 [Worker] Expecting exception from storeWithInLineKeys.add({key: null}) | 216 [Worker] Expecting exception from storeWithInLineKeys.add({key: null}) |
202 PASS [Worker] Exception was thrown. | 217 PASS [Worker] Exception was thrown. |
203 PASS [Worker] code is 0 | 218 PASS [Worker] code is 0 |
204 PASS [Worker] ename is 'DataError' | 219 PASS [Worker] ename is 'DataError' |
| 220 [Worker] Exception message: Evaluating the object store's key path yielded a val
ue that is not a valid key. |
205 [Worker] The object store uses in-line keys but no key generator and the result
of evaluating the object store's key path does not yield a value. | 221 [Worker] The object store uses in-line keys but no key generator and the result
of evaluating the object store's key path does not yield a value. |
206 [Worker] Expecting exception from storeWithInLineKeys.add({}) | 222 [Worker] Expecting exception from storeWithInLineKeys.add({}) |
207 PASS [Worker] Exception was thrown. | 223 PASS [Worker] Exception was thrown. |
208 PASS [Worker] code is 0 | 224 PASS [Worker] code is 0 |
209 PASS [Worker] ename is 'DataError' | 225 PASS [Worker] ename is 'DataError' |
| 226 [Worker] Exception message: Evaluating the object store's key path did not yield
a value. |
210 [Worker] The key parameter was provided but does not contain a valid key. | 227 [Worker] The key parameter was provided but does not contain a valid key. |
211 [Worker] Expecting exception from storeWithOutOfLineKeys.add({}, null) | 228 [Worker] Expecting exception from storeWithOutOfLineKeys.add({}, null) |
212 PASS [Worker] Exception was thrown. | 229 PASS [Worker] Exception was thrown. |
213 PASS [Worker] code is 0 | 230 PASS [Worker] code is 0 |
214 PASS [Worker] ename is 'DataError' | 231 PASS [Worker] ename is 'DataError' |
| 232 [Worker] Exception message: The parameter is not a valid key. |
215 PASS successfullyParsed is true | 233 PASS successfullyParsed is true |
216 | 234 |
217 TEST COMPLETE | 235 TEST COMPLETE |
218 | 236 |
OLD | NEW |