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

Side by Side Diff: LayoutTests/storage/indexeddb/transaction-coordination-ro-waits-for-rw-expected.txt

Issue 745553002: IDB: Layout test showing ro transactions wait for rw transactions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
OLDNEW
(Empty)
1 read-only transaction should see the result of a previous readwrite transaction
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 dbname = "transaction-coordination-ro-waits-for-rw.html"
9 indexedDB.deleteDatabase(dbname)
10 indexedDB.open(dbname)
11
12 prepareDatabase():
13 db = event.target.result
14 store = db.createObjectStore('store')
15 store.put('original value', 'key')
16
17 runTransactions():
18 db = event.target.result
19 transaction1 = db.transaction('store', 'readwrite')
20 transaction2 = db.transaction('store', 'readonly')
21 request = transaction1.objectStore('store').put('new value', 'key')
22 request2 = transaction2.objectStore('store').get('key')
23
24 checkResult():
25 PASS request2.result is "new value"
26 PASS successfullyParsed is true
27
28 TEST COMPLETE
29
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698