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

Side by Side Diff: LayoutTests/storage/indexeddb/resources/exceptions.js

Issue 1149873008: IndexedDB: IDL and tests for IDBObjectStore.getAllKeys(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idb-objectstore-getallkeys
Patch Set: Second patch update. Created 5 years, 6 months 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 if (this.importScripts) { 1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js'); 2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js'); 3 importScripts('shared.js');
4 } 4 }
5 5
6 description("Test that expected exceptions are thrown per IndexedDB spec."); 6 description("Test that expected exceptions are thrown per IndexedDB spec.");
7 7
8 indexedDBTest(prepareDatabase, testDatabase); 8 indexedDBTest(prepareDatabase, testDatabase);
9 function prepareDatabase() 9 function prepareDatabase()
10 { 10 {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 debug(""); 185 debug("");
186 debug("IDBObjectStore.getAll()"); 186 debug("IDBObjectStore.getAll()");
187 debug("If the key parameter is not a valid key or a key range, this method t hrows a DOMException of type DataError."); 187 debug("If the key parameter is not a valid key or a key range, this method t hrows a DOMException of type DataError.");
188 evalAndExpectException("store.getAll({})", "0", "'DataError'"); 188 evalAndExpectException("store.getAll({})", "0", "'DataError'");
189 debug("The transaction this IDBObjectStore belongs to is not active."); 189 debug("The transaction this IDBObjectStore belongs to is not active.");
190 evalAndExpectException("storeFromInactiveTransaction.getAll(0)", "0", "'Tran sactionInactiveError'"); 190 evalAndExpectException("storeFromInactiveTransaction.getAll(0)", "0", "'Tran sactionInactiveError'");
191 // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html 191 // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html
192 192
193 debug(""); 193 debug("");
194 debug("IDBObjectStore.getAllKeys()");
195 debug("If the key parameter is not a valid key or a key range, this method t hrows a DOMException of type DataError.");
196 evalAndExpectException("store.getAllKeys({})", "0", "'DataError'");
197 debug("The transaction this IDBObjectStore belongs to is not active.");
198 evalAndExpectException("storeFromInactiveTransaction.getAllKeys(0)", "0", "' TransactionInactiveError'");
199 // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html
200 //
201 debug("");
194 debug("IDBObjectStore.index()"); 202 debug("IDBObjectStore.index()");
195 debug("There is no index with the given name, compared in a case-sensitive m anner, in the connected database."); 203 debug("There is no index with the given name, compared in a case-sensitive m anner, in the connected database.");
196 evalAndExpectException("store.index('no-such-index')", "DOMException.NOT_FOU ND_ERR", "'NotFoundError'"); 204 evalAndExpectException("store.index('no-such-index')", "DOMException.NOT_FOU ND_ERR", "'NotFoundError'");
197 debug("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."); 205 debug("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.");
198 evalAndExpectException("storeFromInactiveTransaction.index('index')", "DOMEx ception.INVALID_STATE_ERR", "'InvalidStateError'"); 206 evalAndExpectException("storeFromInactiveTransaction.index('index')", "DOMEx ception.INVALID_STATE_ERR", "'InvalidStateError'");
199 // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html 207 // "Occurs if a request is made on a source object that has been deleted or removed." - covered in deleted-objects.html
200 208
201 debug(""); 209 debug("");
202 debug("IDBObjectStore.openCursor()"); 210 debug("IDBObjectStore.openCursor()");
203 debug("If the range parameter is specified but is not a valid key or a key r ange, this method throws a DOMException of type DataError."); 211 debug("If the range parameter is specified but is not a valid key or a key r ange, this method throws a DOMException of type DataError.");
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 502
495 debug(""); 503 debug("");
496 debug("IDBTransaction.abort()"); 504 debug("IDBTransaction.abort()");
497 debug("If this transaction is finished, throw a DOMException of type Invalid StateError. "); 505 debug("If this transaction is finished, throw a DOMException of type Invalid StateError. ");
498 evalAndExpectException("finishedTransaction.abort()", "DOMException.INVALID_ STATE_ERR", "'InvalidStateError'"); 506 evalAndExpectException("finishedTransaction.abort()", "DOMException.INVALID_ STATE_ERR", "'InvalidStateError'");
499 debug("If the requested object store is not in this transaction's scope."); 507 debug("If the requested object store is not in this transaction's scope.");
500 evalAndExpectException("db.transaction('store').objectStore('otherStore')", "DOMException.NOT_FOUND_ERR", "'NotFoundError'"); 508 evalAndExpectException("db.transaction('store').objectStore('otherStore')", "DOMException.NOT_FOUND_ERR", "'NotFoundError'");
501 509
502 finishJSTest(); 510 finishJSTest();
503 } 511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698