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