• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Tests IndexedDB's quota enforcing mechanism.
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6webkitIndexedDB.open('database-quota')
7db = event.target.result
8db.setVersion('new version')
9setVersionSuccess():
10trans = event.target.result
11PASS trans !== null is true
12Deleted all object stores.
13PASS db.version is "new version"
14PASS db.name is "database-quota"
15PASS db.objectStoreNames is []
16PASS db.objectStoreNames.length is 0
17PASS db.objectStoreNames.contains('') is false
18db.createObjectStore("test123")
19PASS db.objectStoreNames is ['test123']
20PASS db.objectStoreNames.length is 1
21PASS db.objectStoreNames.contains('') is false
22PASS db.objectStoreNames.contains('test456') is false
23PASS db.objectStoreNames.contains('test123') is true
24trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
25Creating 'data' which contains 64K of data
26PASS data.length is 65536
27store = trans.objectStore('test123')
28Error function called: (undefined) undefined
29event.preventDefault()
30PASS Adding data failed due to quota error. Data added was about 5 MB
31PASS successfullyParsed is true
32
33TEST COMPLETE
34
35