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