Home | History | Annotate | Download | only in indexeddb
      1 Test IndexedDB's create and removeObjectStore
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 webkitIndexedDB.open('create-and-remove-object-store')
      7 openSuccess():
      8 db = event.target.result
      9 Trying create
     10 Expecting exception from db.createObjectStore("some os")
     11 PASS Exception was thrown.
     12 PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
     13 Trying remove
     14 Expecting exception from db.createObjectStore("some os")
     15 PASS Exception was thrown.
     16 PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
     17 result = db.setVersion('version 1')
     18 Trying create
     19 Expecting exception from db.createObjectStore("some os")
     20 PASS Exception was thrown.
     21 PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
     22 Trying remove
     23 Expecting exception from db.createObjectStore("some os")
     24 PASS Exception was thrown.
     25 PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
     26 Deleted all object stores.
     27 db.createObjectStore('tmp')
     28 Expecting exception from db.createObjectStore('tmp')
     29 PASS Exception was thrown.
     30 PASS code is webkitIDBDatabaseException.CONSTRAINT_ERR
     31 trans = db.transaction({mode: webkitIDBTransaction.READ_WRITE})
     32 trans.objectStore('tmp').get(0)
     33 PASS event.target.result is undefined.
     34 Trying create
     35 Expecting exception from db.createObjectStore("some os")
     36 PASS Exception was thrown.
     37 PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
     38 Trying remove
     39 Expecting exception from db.createObjectStore("some os")
     40 PASS Exception was thrown.
     41 PASS code is webkitIDBDatabaseException.NOT_ALLOWED_ERR
     42 PASS successfullyParsed is true
     43 
     44 TEST COMPLETE
     45 
     46