• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Test IndexedDB's createObjectStore's various options
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('create-object-store-options', 'description')
9db = event.target.result
10request = db.setVersion('version 1')
11Deleted all object stores.
12db.createObjectStore('a', {keyPath: 'a'})
13db.createObjectStore('b')
14db.createObjectStore('c', {autoIncrement: true});
15trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
16PASS trans.mode is webkitIDBTransaction.READ_WRITE
17trans.objectStore('a').put({'a': 0})
18trans.objectStore('b').put({'a': 0}, 0)
19trans.objectStore('a').get(0)
20PASS event.target.result.a is {a: 0}
21trans.objectStore('b').get(0)
22PASS event.target.result.a is {a: 0}
23PASS successfullyParsed is true
24
25TEST COMPLETE
26
27