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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/IndexedDB/transaction-lifetime-empty.html

Issue 2086283003: Update web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into wpt_import Created 4 years, 5 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='support.js'></script>
6 <script> 6 <script>
7 7
8 // Call with a test object and array of expected values. Returns a
9 // function to call with each actual value. Once the expected number
10 // of values is seen, asserts that the value orders match and completes
11 // the test.
8 function expect(t, expected) { 12 function expect(t, expected) {
9 var results = []; 13 var results = [];
10 return result => { 14 return result => {
11 results.push(result); 15 results.push(result);
12 if (results.length === expected.length) { 16 if (results.length === expected.length) {
13 assert_array_equals(results, expected); 17 assert_array_equals(results, expected);
14 t.done(); 18 t.done();
15 } 19 }
16 }; 20 };
17 } 21 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 tx3.onabort = t.unreached_func('transaction should commit'); 80 tx3.onabort = t.unreached_func('transaction should commit');
77 tx3.oncomplete = t.step_func(() => saw('tx3.oncomplete')); 81 tx3.oncomplete = t.step_func(() => saw('tx3.oncomplete'));
78 82
79 var rq2 = store.put('b', 2); 83 var rq2 = store.put('b', 2);
80 rq2.onsuccess = t.step_func(() => saw('rq2.onsuccess')); 84 rq2.onsuccess = t.step_func(() => saw('rq2.onsuccess'));
81 rq2.onerror = t.unreached_func('request should succeed'); 85 rq2.onerror = t.unreached_func('request should succeed');
82 }); 86 });
83 }, 87 },
84 'Multiple transactions without requests complete in the expected order'); 88 'Multiple transactions without requests complete in the expected order');
85 </script> 89 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698