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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/empty-transaction-order.html

Issue 2084053004: IndexedDB: Defer delete calls when there is a running upgrade (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more test case Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>IndexedDB: Commit ordering of empty transactions</title> 2 <title>IndexedDB: Commit ordering of empty transactions</title>
3 <script src='../../resources/testharness.js'></script> 3 <script src='../../resources/testharness.js'></script>
4 <script src='../../resources/testharnessreport.js'></script> 4 <script src='../../resources/testharnessreport.js'></script>
5 <script src='resources/testharness-helpers.js'></script> 5 <script src='resources/testharness-helpers.js'></script>
6 <script> 6 <script>
7 7
8 function expect(t, expected) {
palakj1 2016/06/24 21:36:19 why this test here?
jsbell 2016/06/24 21:37:28 I moved this into testharness-helpers.js since it
9 var results = [];
10 return result => {
11 results.push(result);
12 if (results.length === expected.length) {
13 assert_array_equals(results, expected);
14 t.done();
15 }
16 };
17 }
18
19 indexeddb_test( 8 indexeddb_test(
20 (t, db) => { 9 (t, db) => {
21 db.createObjectStore('store'); 10 db.createObjectStore('store');
22 }, 11 },
23 (t, db) => { 12 (t, db) => {
24 var saw = expect(t, ['rq1.onsuccess', 13 var saw = expect(t, ['rq1.onsuccess',
25 'rq2.onsuccess', 14 'rq2.onsuccess',
26 'tx1.oncomplete', 15 'tx1.oncomplete',
27 'tx2.oncomplete']); 16 'tx2.oncomplete']);
28 17
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 tx3.onabort = t.unreached_func('transaction should commit'); 65 tx3.onabort = t.unreached_func('transaction should commit');
77 tx3.oncomplete = t.step_func(() => saw('tx3.oncomplete')); 66 tx3.oncomplete = t.step_func(() => saw('tx3.oncomplete'));
78 67
79 var rq2 = store.put('b', 2); 68 var rq2 = store.put('b', 2);
80 rq2.onsuccess = t.step_func(() => saw('rq2.onsuccess')); 69 rq2.onsuccess = t.step_func(() => saw('rq2.onsuccess'));
81 rq2.onerror = t.unreached_func('request should succeed'); 70 rq2.onerror = t.unreached_func('request should succeed');
82 }); 71 });
83 }, 72 },
84 'Multiple transactions without requests complete in the expected order'); 73 'Multiple transactions without requests complete in the expected order');
85 </script> 74 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698