1 Test IndexedDB's transaction and objectStore calls 2 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 PASS 'webkitIndexedDB' in window is true 7 PASS webkitIndexedDB == null is false 8 webkitIndexedDB.open('transaction-and-objectstore-calls', 'description') 9 db = event.target.result 10 result = db.setVersion('version 1') 11 trans = event.target.result 12 Deleted all object stores. 13 db.createObjectStore('a') 14 db.createObjectStore('b') 15 trans.addEventListener('complete', created, true) 16 17 trans = db.transaction(['a']) 18 trans.objectStore('a') 19 Expecting exception from trans.objectStore('b') 20 PASS Exception was thrown. 21 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 22 Expecting exception from trans.objectStore('x') 23 PASS Exception was thrown. 24 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 25 26 trans = db.transaction(['a']) 27 trans.objectStore('a') 28 Expecting exception from trans.objectStore('b') 29 PASS Exception was thrown. 30 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 31 Expecting exception from trans.objectStore('x') 32 PASS Exception was thrown. 33 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 34 35 trans = db.transaction(['b']) 36 trans.objectStore('b') 37 Expecting exception from trans.objectStore('a') 38 PASS Exception was thrown. 39 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 40 Expecting exception from trans.objectStore('x') 41 PASS Exception was thrown. 42 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 43 44 trans = db.transaction(['a', 'b']) 45 trans.objectStore('a') 46 trans.objectStore('b') 47 Expecting exception from trans.objectStore('x') 48 PASS Exception was thrown. 49 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 50 51 trans = db.transaction(['b', 'a']) 52 trans.objectStore('a') 53 trans.objectStore('b') 54 Expecting exception from trans.objectStore('x') 55 PASS Exception was thrown. 56 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 57 58 trans = db.transaction([]) 59 trans.objectStore('a') 60 trans.objectStore('b') 61 Expecting exception from trans.objectStore('x') 62 PASS Exception was thrown. 63 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 64 65 trans = db.transaction() 66 trans.objectStore('a') 67 trans.objectStore('b') 68 Expecting exception from trans.objectStore('x') 69 PASS Exception was thrown. 70 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 71 72 Expecting exception from db.transaction(['x']) 73 PASS Exception was thrown. 74 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 75 Expecting exception from db.transaction(['x']) 76 PASS Exception was thrown. 77 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 78 Expecting exception from db.transaction(['a', 'x']) 79 PASS Exception was thrown. 80 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 81 Expecting exception from db.transaction(['x', 'x']) 82 PASS Exception was thrown. 83 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 84 Expecting exception from db.transaction(['a', 'x', 'b']) 85 PASS Exception was thrown. 86 PASS code is webkitIDBDatabaseException.NOT_FOUND_ERR 87 88 PASS successfullyParsed is true 89 90 TEST COMPLETE 91 92