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

Side by Side Diff: LayoutTests/storage/indexeddb/metadata-race.html

Issue 14232020: Ensure IDB transactions started before success arrives see correct medata (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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/metadata-race-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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../fast/js/resources/js-test-pre.js"></script>
3 <script src="resources/shared.js"></script>
4 <script>
5
6 description("Ensure IndexedDB transactions created before open onsuccess have co rrect metadata");
7
8 indexedDBTest(prepareDatabase, onOpenSuccess);
9 function prepareDatabase(evt)
10 {
11 preamble(evt);
12 evalAndLog("db = event.target.result");
13 evalAndLog("store = db.createObjectStore('store')");
14 evalAndLog("store.createIndex('index', 'keyPath')");
15 evalAndLog("transaction = event.target.transaction");
16 shouldNotThrow("index = transaction.objectStore('store').index('index')");
17 transaction.oncomplete = onTransactionComplete;
18 }
19
20 function onTransactionComplete(evt)
21 {
22 preamble(evt);
23 debug("In multiprocess mode, 'complete' event may be dispatched before\n" +
24 "the 'success' arrives with updated metadata. Ensure the new metadata\ n" +
25 "is still used for transactions.");
26 evalAndLog("store = db.transaction('store').objectStore('store')");
27 shouldNotThrow("index = store.index('index')");
28 }
29
30 function onOpenSuccess(evt)
31 {
32 preamble(evt);
33 evalAndLog("db = event.target.result");
34 evalAndLog("store = db.transaction('store').objectStore('store')");
35 shouldNotThrow("index = store.index('index')");
36 finishJSTest();
37 }
38
39 </script>
40 <script src="../../fast/js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/metadata-race-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698