Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: LayoutTests/storage/indexeddb/exceptions-expected.txt

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 Test that expected exceptions are thrown per IndexedDB spec. 1 Test that expected exceptions are thrown per IndexedDB spec.
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 = "exceptions.html" 8 dbname = "exceptions.html"
9 indexedDB.deleteDatabase(dbname) 9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname) 10 indexedDB.open(dbname)
(...skipping 15 matching lines...) Expand all
26 PASS request.readyState is "pending" 26 PASS request.readyState is "pending"
27 27
28 3.2.1 The IDBRequest Interface 28 3.2.1 The IDBRequest Interface
29 29
30 IDBRequest.error 30 IDBRequest.error
31 When the done flag is false, getting this property must throw a DOMException of type InvalidStateError. 31 When the done flag is false, getting this property must throw a DOMException of type InvalidStateError.
32 Expecting exception from request.error 32 Expecting exception from request.error
33 PASS Exception was thrown. 33 PASS Exception was thrown.
34 PASS code is DOMException.INVALID_STATE_ERR 34 PASS code is DOMException.INVALID_STATE_ERR
35 PASS ename is 'InvalidStateError' 35 PASS ename is 'InvalidStateError'
36 Exception message: The request has not finished. 36 Exception message: Failed to read the 'error' property from 'IDBRequest': The re quest has not finished.
37 37
38 IDBRequest.result 38 IDBRequest.result
39 When the done flag is false, getting this property must throw a DOMException of type InvalidStateError. 39 When the done flag is false, getting this property must throw a DOMException of type InvalidStateError.
40 Expecting exception from request.result 40 Expecting exception from request.result
41 PASS Exception was thrown. 41 PASS Exception was thrown.
42 PASS code is DOMException.INVALID_STATE_ERR 42 PASS code is DOMException.INVALID_STATE_ERR
43 PASS ename is 'InvalidStateError' 43 PASS ename is 'InvalidStateError'
44 Exception message: The request has not finished. 44 Exception message: Failed to read the 'result' property from 'IDBRequest': The r equest has not finished.
45 45
46 3.2.3 Opening a database 46 3.2.3 Opening a database
47 47
48 IDBFactory.cmp() 48 IDBFactory.cmp()
49 One of the supplied keys was not a valid key. 49 One of the supplied keys was not a valid key.
50 Expecting exception from indexedDB.cmp(null, 0) 50 Expecting exception from indexedDB.cmp(null, 0)
51 PASS Exception was thrown. 51 PASS Exception was thrown.
52 PASS code is 0 52 PASS code is 0
53 PASS ename is 'DataError' 53 PASS ename is 'DataError'
54 Exception message: The parameter is not a valid key. 54 Exception message: Failed to execute 'cmp' on 'IDBFactory': The parameter is not a valid key.
55 db.close() 55 db.close()
56 56
57 3.2.4 Database 57 3.2.4 Database
58 indexedDB.open(dbname, 2) 58 indexedDB.open(dbname, 2)
59 59
60 IDBDatabase.createObjectStore() 60 IDBDatabase.createObjectStore()
61 If an objectStore with the same name already exists, the implementation must thr ow a DOMException of type ConstraintError. 61 If an objectStore with the same name already exists, the implementation must thr ow a DOMException of type ConstraintError.
62 Expecting exception from db.createObjectStore('store') 62 Expecting exception from db.createObjectStore('store')
63 PASS Exception was thrown. 63 PASS Exception was thrown.
64 PASS code is 0 64 PASS code is 0
65 PASS ename is 'ConstraintError' 65 PASS ename is 'ConstraintError'
66 Exception message: An object store with the specified name already exists. 66 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': An ob ject store with the specified name already exists.
67 If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown. 67 If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown.
68 Expecting exception from db.createObjectStore('fail', {keyPath: '-invalid-'}) 68 Expecting exception from db.createObjectStore('fail', {keyPath: '-invalid-'})
69 PASS Exception was thrown. 69 PASS Exception was thrown.
70 PASS code is DOMException.SYNTAX_ERR 70 PASS code is DOMException.SYNTAX_ERR
71 PASS ename is 'SyntaxError' 71 PASS ename is 'SyntaxError'
72 Exception message: The keyPath option is not a valid key path. 72 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The k eyPath option is not a valid key path.
73 If the optionalParameters parameter is specified, and autoIncrement is set to tr ue, and the keyPath parameter is specified to the empty string, or specified to an Array, this function must throw a InvalidAccessError exception. 73 If the optionalParameters parameter is specified, and autoIncrement is set to tr ue, and the keyPath parameter is specified to the empty string, or specified to an Array, this function must throw a InvalidAccessError exception.
74 Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyP ath: ''}) 74 Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyP ath: ''})
75 PASS Exception was thrown. 75 PASS Exception was thrown.
76 PASS code is DOMException.INVALID_ACCESS_ERR 76 PASS code is DOMException.INVALID_ACCESS_ERR
77 PASS ename is 'InvalidAccessError' 77 PASS ename is 'InvalidAccessError'
78 Exception message: The autoIncrement option was set but the keyPath option was e mpty or an array. 78 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The a utoIncrement option was set but the keyPath option was empty or an array.
79 Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyP ath: ['a']}) 79 Expecting exception from db.createObjectStore('fail', {autoIncrement: true, keyP ath: ['a']})
80 PASS Exception was thrown. 80 PASS Exception was thrown.
81 PASS code is DOMException.INVALID_ACCESS_ERR 81 PASS code is DOMException.INVALID_ACCESS_ERR
82 PASS ename is 'InvalidAccessError' 82 PASS ename is 'InvalidAccessError'
83 Exception message: The autoIncrement option was set but the keyPath option was e mpty or an array. 83 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The a utoIncrement option was set but the keyPath option was empty or an array.
84 84
85 IDBDatabase.deleteObjectStore() 85 IDBDatabase.deleteObjectStore()
86 There is no object store with the given name, compared in a case-sensitive manne r, in the connected database. 86 There is no object store with the given name, compared in a case-sensitive manne r, in the connected database.
87 Expecting exception from db.deleteObjectStore('no-such-store') 87 Expecting exception from db.deleteObjectStore('no-such-store')
88 PASS Exception was thrown. 88 PASS Exception was thrown.
89 PASS code is DOMException.NOT_FOUND_ERR 89 PASS code is DOMException.NOT_FOUND_ERR
90 PASS ename is 'NotFoundError' 90 PASS ename is 'NotFoundError'
91 Exception message: The specified object store was not found. 91 Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The s pecified object store was not found.
92 92
93 IDBDatabase.transaction() 93 IDBDatabase.transaction()
94 If this method is called on IDBDatabase object for which a "versionchange" trans action is still running, a InvalidStateError exception must be thrown. 94 If this method is called on IDBDatabase object for which a "versionchange" trans action is still running, a InvalidStateError exception must be thrown.
95 Expecting exception from db.transaction('store') 95 Expecting exception from db.transaction('store')
96 PASS Exception was thrown. 96 PASS Exception was thrown.
97 PASS code is DOMException.INVALID_STATE_ERR 97 PASS code is DOMException.INVALID_STATE_ERR
98 PASS ename is 'InvalidStateError' 98 PASS ename is 'InvalidStateError'
99 Exception message: A version change transaction is running. 99 Exception message: Failed to execute 'transaction' on 'IDBDatabase': A version c hange transaction is running.
100 One of the names provided in the storeNames argument doesn't exist in this datab ase. 100 One of the names provided in the storeNames argument doesn't exist in this datab ase.
101 Expecting exception from db.transaction('no-such-store') 101 Expecting exception from db.transaction('no-such-store')
102 PASS Exception was thrown. 102 PASS Exception was thrown.
103 PASS code is DOMException.NOT_FOUND_ERR 103 PASS code is DOMException.NOT_FOUND_ERR
104 PASS ename is 'NotFoundError' 104 PASS ename is 'NotFoundError'
105 Exception message: One of the specified object stores was not found. 105 Exception message: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
106 The value for the mode parameter is invalid. 106 The value for the mode parameter is invalid.
107 Expecting TypeError exception from db.transaction('store', 'invalid-mode') 107 Expecting TypeError exception from db.transaction('store', 'invalid-mode')
108 PASS Exception was thrown. 108 PASS Exception was thrown.
109 PASS db.transaction('store', 'invalid-mode') threw TypeError: Type error 109 PASS db.transaction('store', 'invalid-mode') threw TypeError: Type error
110 The function was called with an empty list of store names 110 The function was called with an empty list of store names
111 Expecting exception from db.transaction([]) 111 Expecting exception from db.transaction([])
112 PASS Exception was thrown. 112 PASS Exception was thrown.
113 PASS code is DOMException.INVALID_ACCESS_ERR 113 PASS code is DOMException.INVALID_ACCESS_ERR
114 PASS ename is 'InvalidAccessError' 114 PASS ename is 'InvalidAccessError'
115 Exception message: The storeNames parameter was empty. 115 Exception message: Failed to execute 'transaction' on 'IDBDatabase': The storeNa mes parameter was empty.
116 116
117 One more IDBDatabase.createObjectStore() test: 117 One more IDBDatabase.createObjectStore() test:
118 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError. 118 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError.
119 Expecting exception from db.createObjectStore('fail') 119 Expecting exception from db.createObjectStore('fail')
120 PASS Exception was thrown. 120 PASS Exception was thrown.
121 PASS code is DOMException.INVALID_STATE_ERR 121 PASS code is DOMException.INVALID_STATE_ERR
122 PASS ename is 'InvalidStateError' 122 PASS ename is 'InvalidStateError'
123 Exception message: The database is not running a version change transaction. 123 Exception message: Failed to execute 'createObjectStore' on 'IDBDatabase': The d atabase is not running a version change transaction.
124 124
125 One more IDBDatabase.deleteObjectStore() test: 125 One more IDBDatabase.deleteObjectStore() test:
126 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError. 126 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError.
127 Expecting exception from db.deleteObjectStore('fail') 127 Expecting exception from db.deleteObjectStore('fail')
128 PASS Exception was thrown. 128 PASS Exception was thrown.
129 PASS code is DOMException.INVALID_STATE_ERR 129 PASS code is DOMException.INVALID_STATE_ERR
130 PASS ename is 'InvalidStateError' 130 PASS ename is 'InvalidStateError'
131 Exception message: The database is not running a version change transaction. 131 Exception message: Failed to execute 'deleteObjectStore' on 'IDBDatabase': The d atabase is not running a version change transaction.
132 132
133 Prepare an object store and index from an inactive transaction for later use. 133 Prepare an object store and index from an inactive transaction for later use.
134 finishedTransaction = inactiveTransaction = db.transaction('store') 134 finishedTransaction = inactiveTransaction = db.transaction('store')
135 storeFromInactiveTransaction = inactiveTransaction.objectStore('store') 135 storeFromInactiveTransaction = inactiveTransaction.objectStore('store')
136 indexFromInactiveTransaction = storeFromInactiveTransaction.index('index') 136 indexFromInactiveTransaction = storeFromInactiveTransaction.index('index')
137 request = storeFromInactiveTransaction.openCursor() 137 request = storeFromInactiveTransaction.openCursor()
138 cursorFromInactiveTransaction = request.result 138 cursorFromInactiveTransaction = request.result
139 139
140 3.2.5 Object Store 140 3.2.5 Object Store
141 ro_transaction = db.transaction('store', 'readonly') 141 ro_transaction = db.transaction('store', 'readonly')
142 storeFromReadOnlyTransaction = ro_transaction.objectStore('store') 142 storeFromReadOnlyTransaction = ro_transaction.objectStore('store')
143 rw_transaction = db.transaction('store', 'readwrite') 143 rw_transaction = db.transaction('store', 'readwrite')
144 store = rw_transaction.objectStore('store') 144 store = rw_transaction.objectStore('store')
145 145
146 IDBObjectStore.add() 146 IDBObjectStore.add()
147 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly". 147 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
148 Expecting exception from storeFromReadOnlyTransaction.add(0, 0) 148 Expecting exception from storeFromReadOnlyTransaction.add(0, 0)
149 PASS Exception was thrown. 149 PASS Exception was thrown.
150 PASS code is 0 150 PASS code is 0
151 PASS ename is 'ReadOnlyError' 151 PASS ename is 'ReadOnlyError'
152 Exception message: A write operation was attempted in a read-only transaction. 152 Exception message: A write operation was attempted in a read-only transaction.
153 The transaction this IDBObjectStore belongs to is not active. 153 The transaction this IDBObjectStore belongs to is not active.
154 Expecting exception from storeFromInactiveTransaction.add(0, 0) 154 Expecting exception from storeFromInactiveTransaction.add(0, 0)
155 PASS Exception was thrown. 155 PASS Exception was thrown.
156 PASS code is 0 156 PASS code is 0
157 PASS ename is 'TransactionInactiveError' 157 PASS ename is 'TransactionInactiveError'
158 Exception message: The transaction has finished. 158 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction has finished.
159 The data being stored could not be cloned by the internal structured cloning alg orithm. 159 The data being stored could not be cloned by the internal structured cloning alg orithm.
160 Expecting exception from store.add(self, 0) 160 Expecting exception from store.add(self, 0)
161 PASS Exception was thrown. 161 PASS Exception was thrown.
162 PASS code is DOMException.DATA_CLONE_ERR 162 PASS code is DOMException.DATA_CLONE_ERR
163 Exception message: An object could not be cloned. 163 Exception message: An object could not be cloned.
164 164
165 IDBObjectStore.clear() 165 IDBObjectStore.clear()
166 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly". 166 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
167 Expecting exception from storeFromReadOnlyTransaction.clear() 167 Expecting exception from storeFromReadOnlyTransaction.clear()
168 PASS Exception was thrown. 168 PASS Exception was thrown.
169 PASS code is 0 169 PASS code is 0
170 PASS ename is 'ReadOnlyError' 170 PASS ename is 'ReadOnlyError'
171 Exception message: A write operation was attempted in a read-only transaction. 171 Exception message: A write operation was attempted in a read-only transaction.
172 The transaction this IDBObjectStore belongs to is not active. 172 The transaction this IDBObjectStore belongs to is not active.
173 Expecting exception from storeFromInactiveTransaction.clear() 173 Expecting exception from storeFromInactiveTransaction.clear()
174 PASS Exception was thrown. 174 PASS Exception was thrown.
175 PASS code is 0 175 PASS code is 0
176 PASS ename is 'TransactionInactiveError' 176 PASS ename is 'TransactionInactiveError'
177 Exception message: The transaction has finished. 177 Exception message: Failed to execute 'clear' on 'IDBObjectStore': The transactio n has finished.
178 178
179 IDBObjectStore.count() 179 IDBObjectStore.count()
180 If the optional key parameter is not a valid key or a key range, this method thr ows a DOMException of type DataError. 180 If the optional key parameter is not a valid key or a key range, this method thr ows a DOMException of type DataError.
181 Expecting exception from store.count({}) 181 Expecting exception from store.count({})
182 PASS Exception was thrown. 182 PASS Exception was thrown.
183 PASS code is 0 183 PASS code is 0
184 PASS ename is 'DataError' 184 PASS ename is 'DataError'
185 Exception message: The parameter is not a valid key. 185 Exception message: Failed to execute 'count' on 'IDBObjectStore': The parameter is not a valid key.
186 The transaction this IDBObjectStore belongs to is not active. 186 The transaction this IDBObjectStore belongs to is not active.
187 Expecting exception from storeFromInactiveTransaction.count() 187 Expecting exception from storeFromInactiveTransaction.count()
188 PASS Exception was thrown. 188 PASS Exception was thrown.
189 PASS code is 0 189 PASS code is 0
190 PASS ename is 'TransactionInactiveError' 190 PASS ename is 'TransactionInactiveError'
191 Exception message: The transaction has finished. 191 Exception message: Failed to execute 'count' on 'IDBObjectStore': The transactio n has finished.
192 192
193 IDBObjectStore.delete() 193 IDBObjectStore.delete()
194 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly". 194 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
195 Expecting exception from storeFromReadOnlyTransaction.delete(0) 195 Expecting exception from storeFromReadOnlyTransaction.delete(0)
196 PASS Exception was thrown. 196 PASS Exception was thrown.
197 PASS code is 0 197 PASS code is 0
198 PASS ename is 'ReadOnlyError' 198 PASS ename is 'ReadOnlyError'
199 Exception message: A write operation was attempted in a read-only transaction. 199 Exception message: A write operation was attempted in a read-only transaction.
200 If the key parameter is not a valid key or a key range this method throws a DOME xception of type DataError. 200 If the key parameter is not a valid key or a key range this method throws a DOME xception of type DataError.
201 Expecting exception from store.delete({}) 201 Expecting exception from store.delete({})
202 PASS Exception was thrown. 202 PASS Exception was thrown.
203 PASS code is 0 203 PASS code is 0
204 PASS ename is 'DataError' 204 PASS ename is 'DataError'
205 Exception message: The parameter is not a valid key. 205 Exception message: Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.
206 The transaction this IDBObjectStore belongs to is not active. 206 The transaction this IDBObjectStore belongs to is not active.
207 Expecting exception from storeFromInactiveTransaction.add(0, 0) 207 Expecting exception from storeFromInactiveTransaction.add(0, 0)
208 PASS Exception was thrown. 208 PASS Exception was thrown.
209 PASS code is 0 209 PASS code is 0
210 PASS ename is 'TransactionInactiveError' 210 PASS ename is 'TransactionInactiveError'
211 Exception message: The transaction has finished. 211 Exception message: Failed to execute 'add' on 'IDBObjectStore': The transaction has finished.
212 212
213 IDBObjectStore.get() 213 IDBObjectStore.get()
214 If the key parameter is not a valid key or a key range, this method throws a DOM Exception of type DataError. 214 If the key parameter is not a valid key or a key range, this method throws a DOM Exception of type DataError.
215 Expecting exception from store.get({}) 215 Expecting exception from store.get({})
216 PASS Exception was thrown. 216 PASS Exception was thrown.
217 PASS code is 0 217 PASS code is 0
218 PASS ename is 'DataError' 218 PASS ename is 'DataError'
219 Exception message: The parameter is not a valid key. 219 Exception message: Failed to execute 'get' on 'IDBObjectStore': The parameter is not a valid key.
220 The transaction this IDBObjectStore belongs to is not active. 220 The transaction this IDBObjectStore belongs to is not active.
221 Expecting exception from storeFromInactiveTransaction.get(0) 221 Expecting exception from storeFromInactiveTransaction.get(0)
222 PASS Exception was thrown. 222 PASS Exception was thrown.
223 PASS code is 0 223 PASS code is 0
224 PASS ename is 'TransactionInactiveError' 224 PASS ename is 'TransactionInactiveError'
225 Exception message: The transaction has finished. 225 Exception message: Failed to execute 'get' on 'IDBObjectStore': The transaction has finished.
226 226
227 IDBObjectStore.index() 227 IDBObjectStore.index()
228 There is no index with the given name, compared in a case-sensitive manner, in t he connected database. 228 There is no index with the given name, compared in a case-sensitive manner, in t he connected database.
229 Expecting exception from store.index('no-such-index') 229 Expecting exception from store.index('no-such-index')
230 PASS Exception was thrown. 230 PASS Exception was thrown.
231 PASS code is DOMException.NOT_FOUND_ERR 231 PASS code is DOMException.NOT_FOUND_ERR
232 PASS ename is 'NotFoundError' 232 PASS ename is 'NotFoundError'
233 Exception message: The specified index was not found. 233 Exception message: Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.
234 Occurs if a request is made on a source object that has been deleted or removed, or if the transaction the object store belongs to has finished. 234 Occurs if a request is made on a source object that has been deleted or removed, or if the transaction the object store belongs to has finished.
235 Expecting exception from storeFromInactiveTransaction.index('index') 235 Expecting exception from storeFromInactiveTransaction.index('index')
236 PASS Exception was thrown. 236 PASS Exception was thrown.
237 PASS code is DOMException.INVALID_STATE_ERR 237 PASS code is DOMException.INVALID_STATE_ERR
238 PASS ename is 'InvalidStateError' 238 PASS ename is 'InvalidStateError'
239 Exception message: The transaction has finished. 239 Exception message: Failed to execute 'index' on 'IDBObjectStore': The transactio n has finished.
240 240
241 IDBObjectStore.openCursor() 241 IDBObjectStore.openCursor()
242 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError. 242 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
243 Expecting exception from store.openCursor({}) 243 Expecting exception from store.openCursor({})
244 PASS Exception was thrown. 244 PASS Exception was thrown.
245 PASS code is 0 245 PASS code is 0
246 PASS ename is 'DataError' 246 PASS ename is 'DataError'
247 Exception message: The parameter is not a valid key. 247 Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The param eter is not a valid key.
248 The transaction this IDBObjectStore belongs to is not active. 248 The transaction this IDBObjectStore belongs to is not active.
249 Expecting exception from storeFromInactiveTransaction.openCursor() 249 Expecting exception from storeFromInactiveTransaction.openCursor()
250 PASS Exception was thrown. 250 PASS Exception was thrown.
251 PASS code is 0 251 PASS code is 0
252 PASS ename is 'TransactionInactiveError' 252 PASS ename is 'TransactionInactiveError'
253 Exception message: The transaction has finished. 253 Exception message: Failed to execute 'openCursor' on 'IDBObjectStore': The trans action has finished.
254 The value for the direction parameter is invalid. 254 The value for the direction parameter is invalid.
255 Expecting TypeError exception from store.openCursor(0, 'invalid-direction') 255 Expecting TypeError exception from store.openCursor(0, 'invalid-direction')
256 PASS Exception was thrown. 256 PASS Exception was thrown.
257 PASS store.openCursor(0, 'invalid-direction') threw TypeError: Type error 257 PASS store.openCursor(0, 'invalid-direction') threw TypeError: Type error
258 258
259 IDBObjectStore.openKeyCursor() 259 IDBObjectStore.openKeyCursor()
260 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError. 260 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
261 Expecting exception from store.openKeyCursor({}) 261 Expecting exception from store.openKeyCursor({})
262 PASS Exception was thrown. 262 PASS Exception was thrown.
263 PASS code is 0 263 PASS code is 0
264 PASS ename is 'DataError' 264 PASS ename is 'DataError'
265 Exception message: The parameter is not a valid key. 265 Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The pa rameter is not a valid key.
266 The transaction this IDBObjectStore belongs to is not active. 266 The transaction this IDBObjectStore belongs to is not active.
267 Expecting exception from storeFromInactiveTransaction.openKeyCursor() 267 Expecting exception from storeFromInactiveTransaction.openKeyCursor()
268 PASS Exception was thrown. 268 PASS Exception was thrown.
269 PASS code is 0 269 PASS code is 0
270 PASS ename is 'TransactionInactiveError' 270 PASS ename is 'TransactionInactiveError'
271 Exception message: The transaction has finished. 271 Exception message: Failed to execute 'openKeyCursor' on 'IDBObjectStore': The tr ansaction has finished.
272 The value for the direction parameter is invalid. 272 The value for the direction parameter is invalid.
273 Expecting TypeError exception from store.openKeyCursor(0, 'invalid-direction') 273 Expecting TypeError exception from store.openKeyCursor(0, 'invalid-direction')
274 PASS Exception was thrown. 274 PASS Exception was thrown.
275 PASS store.openKeyCursor(0, 'invalid-direction') threw TypeError: Type error 275 PASS store.openKeyCursor(0, 'invalid-direction') threw TypeError: Type error
276 276
277 IDBObjectStore.put() 277 IDBObjectStore.put()
278 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly". 278 This method throws a DOMException of type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to "readonly".
279 Expecting exception from storeFromReadOnlyTransaction.put(0, 0) 279 Expecting exception from storeFromReadOnlyTransaction.put(0, 0)
280 PASS Exception was thrown. 280 PASS Exception was thrown.
281 PASS code is 0 281 PASS code is 0
282 PASS ename is 'ReadOnlyError' 282 PASS ename is 'ReadOnlyError'
283 Exception message: A write operation was attempted in a read-only transaction. 283 Exception message: A write operation was attempted in a read-only transaction.
284 The transaction this IDBObjectStore belongs to is not active. 284 The transaction this IDBObjectStore belongs to is not active.
285 Expecting exception from storeFromInactiveTransaction.put(0, 0) 285 Expecting exception from storeFromInactiveTransaction.put(0, 0)
286 PASS Exception was thrown. 286 PASS Exception was thrown.
287 PASS code is 0 287 PASS code is 0
288 PASS ename is 'TransactionInactiveError' 288 PASS ename is 'TransactionInactiveError'
289 Exception message: The transaction has finished. 289 Exception message: Failed to execute 'put' on 'IDBObjectStore': The transaction has finished.
290 The data being stored could not be cloned by the internal structured cloning alg orithm. 290 The data being stored could not be cloned by the internal structured cloning alg orithm.
291 Expecting exception from store.put(self, 0) 291 Expecting exception from store.put(self, 0)
292 PASS Exception was thrown. 292 PASS Exception was thrown.
293 PASS code is DOMException.DATA_CLONE_ERR 293 PASS code is DOMException.DATA_CLONE_ERR
294 Exception message: An object could not be cloned. 294 Exception message: An object could not be cloned.
295 db.close() 295 db.close()
296 ro_transaction.oncomplete = transactionComplete 296 ro_transaction.oncomplete = transactionComplete
297 rw_transaction.oncomplete = transactionComplete 297 rw_transaction.oncomplete = transactionComplete
298 298
299 transactionComplete(): 299 transactionComplete():
300 First transaction completed 300 First transaction completed
301 301
302 transactionComplete(): 302 transactionComplete():
303 request = indexedDB.open(dbname, 3) 303 request = indexedDB.open(dbname, 3)
304 request.onupgradeneeded = onUpgradeNeeded3 304 request.onupgradeneeded = onUpgradeNeeded3
305 305
306 IDBObjectStore.createIndex() 306 IDBObjectStore.createIndex()
307 If an index with the same name already exists, the implementation must throw a D OMException of type ConstraintError. 307 If an index with the same name already exists, the implementation must throw a D OMException of type ConstraintError.
308 Expecting exception from store.createIndex('index', 'keyPath') 308 Expecting exception from store.createIndex('index', 'keyPath')
309 PASS Exception was thrown. 309 PASS Exception was thrown.
310 PASS code is 0 310 PASS code is 0
311 PASS ename is 'ConstraintError' 311 PASS ename is 'ConstraintError'
312 Exception message: An index with the specified name already exists. 312 Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': An index with the specified name already exists.
313 If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown. 313 If keyPath is not a valid key path then a DOMException of type SyntaxError must be thrown.
314 Expecting exception from store.createIndex('fail', '-invalid-') 314 Expecting exception from store.createIndex('fail', '-invalid-')
315 PASS Exception was thrown. 315 PASS Exception was thrown.
316 PASS code is DOMException.SYNTAX_ERR 316 PASS code is DOMException.SYNTAX_ERR
317 PASS ename is 'SyntaxError' 317 PASS ename is 'SyntaxError'
318 Exception message: The keyPath argument contains an invalid key path. 318 Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyP ath argument contains an invalid key path.
319 If keyPath is an Array and the multiEntry property in the optionalParameters is true, then a DOMException of type InvalidAccessError must be thrown. 319 If keyPath is an Array and the multiEntry property in the optionalParameters is true, then a DOMException of type InvalidAccessError must be thrown.
320 Expecting exception from store.createIndex('fail', ['a'], {multiEntry: true}) 320 Expecting exception from store.createIndex('fail', ['a'], {multiEntry: true})
321 PASS Exception was thrown. 321 PASS Exception was thrown.
322 PASS code is DOMException.INVALID_ACCESS_ERR 322 PASS code is DOMException.INVALID_ACCESS_ERR
323 PASS ename is 'InvalidAccessError' 323 PASS ename is 'InvalidAccessError'
324 Exception message: The keyPath argument was an array and the multiEntry option i s true. 324 Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The keyP ath argument was an array and the multiEntry option is true.
325 325
326 IDBObjectStore.deleteIndex() 326 IDBObjectStore.deleteIndex()
327 There is no index with the given name, compared in a case-sensitive manner, in t he connected database. 327 There is no index with the given name, compared in a case-sensitive manner, in t he connected database.
328 Expecting exception from store.deleteIndex('no-such-index') 328 Expecting exception from store.deleteIndex('no-such-index')
329 PASS Exception was thrown. 329 PASS Exception was thrown.
330 PASS code is DOMException.NOT_FOUND_ERR 330 PASS code is DOMException.NOT_FOUND_ERR
331 PASS ename is 'NotFoundError' 331 PASS ename is 'NotFoundError'
332 Exception message: The specified index was not found. 332 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The spec ified index was not found.
333 333
334 One more IDBObjectStore.createIndex() test: 334 One more IDBObjectStore.createIndex() test:
335 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError. 335 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError.
336 Expecting exception from db.transaction('store').objectStore('store').createInde x('fail', 'keyPath') 336 Expecting exception from db.transaction('store').objectStore('store').createInde x('fail', 'keyPath')
337 PASS Exception was thrown. 337 PASS Exception was thrown.
338 PASS code is DOMException.INVALID_STATE_ERR 338 PASS code is DOMException.INVALID_STATE_ERR
339 PASS ename is 'InvalidStateError' 339 PASS ename is 'InvalidStateError'
340 Exception message: The database is not running a version change transaction. 340 Exception message: Failed to execute 'createIndex' on 'IDBObjectStore': The data base is not running a version change transaction.
341 341
342 One more IDBObjectStore.deleteIndex() test: 342 One more IDBObjectStore.deleteIndex() test:
343 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError. 343 If this function is called from outside a "versionchange" transaction callback . .. the implementation must throw a DOMException of type InvalidStateError.
344 Expecting exception from db.transaction('store').objectStore('store').deleteInde x('fail', 'keyPath') 344 Expecting exception from db.transaction('store').objectStore('store').deleteInde x('fail', 'keyPath')
345 PASS Exception was thrown. 345 PASS Exception was thrown.
346 PASS code is DOMException.INVALID_STATE_ERR 346 PASS code is DOMException.INVALID_STATE_ERR
347 PASS ename is 'InvalidStateError' 347 PASS ename is 'InvalidStateError'
348 Exception message: The database is not running a version change transaction. 348 Exception message: Failed to execute 'deleteIndex' on 'IDBObjectStore': The data base is not running a version change transaction.
349 349
350 3.2.6 Index 350 3.2.6 Index
351 indexFromReadOnlyTransaction = db.transaction('store', 'readonly').objectStore(' store').index('index') 351 indexFromReadOnlyTransaction = db.transaction('store', 'readonly').objectStore(' store').index('index')
352 index = db.transaction('store', 'readwrite').objectStore('store').index('index') 352 index = db.transaction('store', 'readwrite').objectStore('store').index('index')
353 353
354 IDBIndex.count() 354 IDBIndex.count()
355 If the optional key parameter is not a valid key or a key range, this method thr ows a DOMException of type DataError. 355 If the optional key parameter is not a valid key or a key range, this method thr ows a DOMException of type DataError.
356 Expecting exception from index.count({}) 356 Expecting exception from index.count({})
357 PASS Exception was thrown. 357 PASS Exception was thrown.
358 PASS code is 0 358 PASS code is 0
359 PASS ename is 'DataError' 359 PASS ename is 'DataError'
360 Exception message: The parameter is not a valid key. 360 Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
361 The transaction this IDBIndex belongs to is not active. 361 The transaction this IDBIndex belongs to is not active.
362 Expecting exception from indexFromInactiveTransaction.count() 362 Expecting exception from indexFromInactiveTransaction.count()
363 PASS Exception was thrown. 363 PASS Exception was thrown.
364 PASS code is 0 364 PASS code is 0
365 PASS ename is 'TransactionInactiveError' 365 PASS ename is 'TransactionInactiveError'
366 Exception message: The transaction has finished. 366 Exception message: Failed to execute 'count' on 'IDBIndex': The transaction has finished.
367 367
368 IDBIndex.get() 368 IDBIndex.get()
369 If the key parameter is not a valid key or a key range, this method throws a DOM Exception of type DataError. 369 If the key parameter is not a valid key or a key range, this method throws a DOM Exception of type DataError.
370 Expecting exception from index.get({}) 370 Expecting exception from index.get({})
371 PASS Exception was thrown. 371 PASS Exception was thrown.
372 PASS code is 0 372 PASS code is 0
373 PASS ename is 'DataError' 373 PASS ename is 'DataError'
374 Exception message: The parameter is not a valid key. 374 Exception message: Failed to execute 'get' on 'IDBIndex': The parameter is not a valid key.
375 The transaction this IDBIndex belongs to is not active. 375 The transaction this IDBIndex belongs to is not active.
376 Expecting exception from indexFromInactiveTransaction.get(0) 376 Expecting exception from indexFromInactiveTransaction.get(0)
377 PASS Exception was thrown. 377 PASS Exception was thrown.
378 PASS code is 0 378 PASS code is 0
379 PASS ename is 'TransactionInactiveError' 379 PASS ename is 'TransactionInactiveError'
380 Exception message: The transaction has finished. 380 Exception message: Failed to execute 'get' on 'IDBIndex': The transaction has fi nished.
381 381
382 IDBIndex.getKey() 382 IDBIndex.getKey()
383 If the key parameter is not a valid key or a key range, this method throws a DOM Exception of type DataError. 383 If the key parameter is not a valid key or a key range, this method throws a DOM Exception of type DataError.
384 Expecting exception from index.getKey({}) 384 Expecting exception from index.getKey({})
385 PASS Exception was thrown. 385 PASS Exception was thrown.
386 PASS code is 0 386 PASS code is 0
387 PASS ename is 'DataError' 387 PASS ename is 'DataError'
388 Exception message: The parameter is not a valid key. 388 Exception message: Failed to execute 'getKey' on 'IDBIndex': The parameter is no t a valid key.
389 The transaction this IDBIndex belongs to is not active. 389 The transaction this IDBIndex belongs to is not active.
390 Expecting exception from indexFromInactiveTransaction.getKey(0) 390 Expecting exception from indexFromInactiveTransaction.getKey(0)
391 PASS Exception was thrown. 391 PASS Exception was thrown.
392 PASS code is 0 392 PASS code is 0
393 PASS ename is 'TransactionInactiveError' 393 PASS ename is 'TransactionInactiveError'
394 Exception message: The transaction has finished. 394 Exception message: Failed to execute 'getKey' on 'IDBIndex': The transaction has finished.
395 395
396 IDBIndex.openCursor() 396 IDBIndex.openCursor()
397 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError. 397 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
398 Expecting exception from index.openCursor({}) 398 Expecting exception from index.openCursor({})
399 PASS Exception was thrown. 399 PASS Exception was thrown.
400 PASS code is 0 400 PASS code is 0
401 PASS ename is 'DataError' 401 PASS ename is 'DataError'
402 Exception message: The parameter is not a valid key. 402 Exception message: Failed to execute 'openCursor' on 'IDBIndex': The parameter i s not a valid key.
403 The transaction this IDBIndex belongs to is not active. 403 The transaction this IDBIndex belongs to is not active.
404 Expecting exception from indexFromInactiveTransaction.openCursor() 404 Expecting exception from indexFromInactiveTransaction.openCursor()
405 PASS Exception was thrown. 405 PASS Exception was thrown.
406 PASS code is 0 406 PASS code is 0
407 PASS ename is 'TransactionInactiveError' 407 PASS ename is 'TransactionInactiveError'
408 Exception message: The transaction has finished. 408 Exception message: Failed to execute 'openCursor' on 'IDBIndex': The transaction has finished.
409 The value for the direction parameter is invalid. 409 The value for the direction parameter is invalid.
410 Expecting TypeError exception from index.openCursor(0, 'invalid-direction') 410 Expecting TypeError exception from index.openCursor(0, 'invalid-direction')
411 PASS Exception was thrown. 411 PASS Exception was thrown.
412 PASS index.openCursor(0, 'invalid-direction') threw TypeError: Type error 412 PASS index.openCursor(0, 'invalid-direction') threw TypeError: Type error
413 413
414 IDBIndex.openKeyCursor() 414 IDBIndex.openKeyCursor()
415 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError. 415 If the range parameter is specified but is not a valid key or a key range, this method throws a DOMException of type DataError.
416 Expecting exception from index.openKeyCursor({}) 416 Expecting exception from index.openKeyCursor({})
417 PASS Exception was thrown. 417 PASS Exception was thrown.
418 PASS code is 0 418 PASS code is 0
419 PASS ename is 'DataError' 419 PASS ename is 'DataError'
420 Exception message: The parameter is not a valid key. 420 Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The paramete r is not a valid key.
421 The transaction this IDBIndex belongs to is not active. 421 The transaction this IDBIndex belongs to is not active.
422 Expecting exception from indexFromInactiveTransaction.openKeyCursor() 422 Expecting exception from indexFromInactiveTransaction.openKeyCursor()
423 PASS Exception was thrown. 423 PASS Exception was thrown.
424 PASS code is 0 424 PASS code is 0
425 PASS ename is 'TransactionInactiveError' 425 PASS ename is 'TransactionInactiveError'
426 Exception message: The transaction has finished. 426 Exception message: Failed to execute 'openKeyCursor' on 'IDBIndex': The transact ion has finished.
427 The value for the direction parameter is invalid. 427 The value for the direction parameter is invalid.
428 Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction') 428 Expecting TypeError exception from index.openKeyCursor(0, 'invalid-direction')
429 PASS Exception was thrown. 429 PASS Exception was thrown.
430 PASS index.openKeyCursor(0, 'invalid-direction') threw TypeError: Type error 430 PASS index.openKeyCursor(0, 'invalid-direction') threw TypeError: Type error
431 431
432 3.2.7 Cursor 432 3.2.7 Cursor
433 transaction = db.transaction(['store', 'inlineKeyStore'], 'readwrite') 433 transaction = db.transaction(['store', 'inlineKeyStore'], 'readwrite')
434 request = transaction.objectStore('store').openCursor() 434 request = transaction.objectStore('store').openCursor()
435 cursor = request.result 435 cursor = request.result
436 request = transaction.objectStore('store').index('index').openKeyCursor() 436 request = transaction.objectStore('store').index('index').openKeyCursor()
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction. 551 Exception message: Failed to execute 'update' on 'IDBCursor': The record may not be updated inside a read-only transaction.
552 552
553 3.2.8 Transaction 553 3.2.8 Transaction
554 554
555 IDBTransaction.abort() 555 IDBTransaction.abort()
556 If this transaction is finished, throw a DOMException of type InvalidStateError. 556 If this transaction is finished, throw a DOMException of type InvalidStateError.
557 Expecting exception from finishedTransaction.abort() 557 Expecting exception from finishedTransaction.abort()
558 PASS Exception was thrown. 558 PASS Exception was thrown.
559 PASS code is DOMException.INVALID_STATE_ERR 559 PASS code is DOMException.INVALID_STATE_ERR
560 PASS ename is 'InvalidStateError' 560 PASS ename is 'InvalidStateError'
561 Exception message: The transaction has finished. 561 Exception message: Failed to execute 'abort' on 'IDBTransaction': The transactio n has finished.
562 If the requested object store is not in this transaction's scope. 562 If the requested object store is not in this transaction's scope.
563 Expecting exception from db.transaction('store').objectStore('otherStore') 563 Expecting exception from db.transaction('store').objectStore('otherStore')
564 PASS Exception was thrown. 564 PASS Exception was thrown.
565 PASS code is DOMException.NOT_FOUND_ERR 565 PASS code is DOMException.NOT_FOUND_ERR
566 PASS ename is 'NotFoundError' 566 PASS ename is 'NotFoundError'
567 Exception message: The specified object store was not found. 567 Exception message: Failed to execute 'objectStore' on 'IDBTransaction': The spec ified object store was not found.
568 PASS successfullyParsed is true 568 PASS successfullyParsed is true
569 569
570 TEST COMPLETE 570 TEST COMPLETE
571 571
OLDNEW
« no previous file with comments | « LayoutTests/storage/indexeddb/deleted-objects-expected.txt ('k') | LayoutTests/storage/indexeddb/factory-cmp-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698