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

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

Issue 745553002: IDB: Layout test showing ro transactions wait for rw transactions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove hyphen from -expected.txt 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
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/transaction-coordination-ro-waits-for-rw.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js');
4 }
5
6 description("readonly transaction should see the result of a previous readwrite transaction");
7
8 indexedDBTest(prepareDatabase, runTransactions);
9
10 function prepareDatabase(evt)
11 {
12 preamble(evt);
13 evalAndLog("db = event.target.result");
14 evalAndLog("store = db.createObjectStore('store')");
15 evalAndLog("store.put('original value', 'key')");
16 }
17
18 function runTransactions(evt)
19 {
20 preamble(evt);
21 evalAndLog("db = event.target.result");
22 evalAndLog("transaction1 = db.transaction('store', 'readwrite')");
23 transaction1.onabort = unexpectedAbortCallback;
24 evalAndLog("transaction2 = db.transaction('store', 'readonly')");
25 transaction2.onabort = unexpectedAbortCallback;
26
27 evalAndLog("request = transaction1.objectStore('store').put('new value', 'ke y')");
28 request.onerror = unexpectedErrorCallback;
29
30 evalAndLog("request2 = transaction2.objectStore('store').get('key')");
31 request2.onerror = unexpectedErrorCallback;
32 request2.onsuccess = function checkResult(evt) {
33 preamble(evt);
34 shouldBeEqualToString('request2.result', 'new value');
35 db.close();
36 finishJSTest();
37 };
38 }
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/transaction-coordination-ro-waits-for-rw.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698