Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: LayoutTests/storage/indexeddb/data-corruption-expected.txt

Issue 17060008: Add dataLoss property to IDB's upgradeneeded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add blink API stub for compatibility with and without chromium changes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/events-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Test that data inserted into IndexedDB does not get corrupted on disk. 1 Test that data inserted into IndexedDB does not get corrupted on disk.
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self. msIndexedDB || self.OIndexedDB; 6 indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self. msIndexedDB || self.OIndexedDB;
7 7
8 dbname = "data-corruption.html" 8 dbname = "data-corruption.html"
9 indexedDB.deleteDatabase(dbname) 9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname) 10 indexedDB.open(dbname)
11 setVersionSuccess(): 11 setVersionSuccess():
12 PASS event.dataLoss is "none"
12 trans = event.target.transaction 13 trans = event.target.transaction
13 PASS trans is non-null. 14 PASS trans is non-null.
14 db.createObjectStore('storeName') 15 db.createObjectStore('storeName')
15 addData(): 16 addData():
16 transaction = db.transaction(['storeName'], 'readwrite') 17 transaction = db.transaction(['storeName'], 'readwrite')
17 request = transaction.objectStore('storeName').add({x: testDate}, 'key') 18 request = transaction.objectStore('storeName').add({x: testDate}, 'key')
18 addData(): 19 addData():
19 transaction = db.transaction(['storeName'], 'readonly') 20 transaction = db.transaction(['storeName'], 'readonly')
20 request = transaction.objectStore('storeName').get('key') 21 request = transaction.objectStore('storeName').get('key')
21 PASS event.target.result.x.toString() is testDate.toString() 22 PASS event.target.result.x.toString() is testDate.toString()
22 PASS successfullyParsed is true 23 PASS successfullyParsed is true
23 24
24 TEST COMPLETE 25 TEST COMPLETE
25 26
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698