Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / data-corruption-expected.txt
blobe91d84fcf7fe2d23f06e7fc16a054c1afab3758b
1 Test that data inserted into IndexedDB does not get corrupted on disk.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "data-corruption.html"
7 indexedDB.deleteDatabase(dbname)
8 indexedDB.open(dbname)
9 setVersionSuccess():
10 PASS event.dataLoss is "none"
11 trans = event.target.transaction
12 PASS trans is non-null.
13 db.createObjectStore('storeName')
14 addData():
15 transaction = db.transaction(['storeName'], 'readwrite')
16 request = transaction.objectStore('storeName').add({x: testDate}, 'key')
17 addData():
18 transaction = db.transaction(['storeName'], 'readonly')
19 request = transaction.objectStore('storeName').get('key')
20 PASS event.target.result.x.toString() is testDate.toString()
21 PASS successfullyParsed is true
23 TEST COMPLETE