Check IDB quota usage through QuotaManager
[WebKit-https.git] / LayoutTests / storage / indexeddb / storage-limit-expected.txt
1 This test makes sure that storage of indexedDB does not grow unboundedly.
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
7
8 indexedDB.deleteDatabase(dbname)
9 indexedDB.open(dbname)
10
11 prepareDatabase():
12 db = event.target.result
13 store = db.createObjectStore('store')
14
15 onOpenSuccess():
16 db = event.target.result
17 store = db.transaction('store', 'readwrite').objectStore('store')
18 request = store.add(new Uint8Array(409601), 0)
19 PASS 'error' in request is true
20 PASS request.error.code is DOMException.QUOTA_EXCEEDED_ERR
21 PASS request.error.name is "QuotaExceededError"
22 PASS successfullyParsed is true
23
24 TEST COMPLETE
25