OLD | NEW |
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='support.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 | 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 | 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 | 10 // of values is seen, asserts that the value orders match and completes |
11 // the test. | 11 // the test. |
12 function expect(t, expected) { | 12 function expect(t, expected) { |
13 var results = []; | 13 var results = []; |
14 return result => { | 14 return result => { |
15 results.push(result); | 15 results.push(result); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 tx3.onabort = t.unreached_func('transaction should commit'); | 80 tx3.onabort = t.unreached_func('transaction should commit'); |
81 tx3.oncomplete = t.step_func(() => saw('tx3.oncomplete')); | 81 tx3.oncomplete = t.step_func(() => saw('tx3.oncomplete')); |
82 | 82 |
83 var rq2 = store.put('b', 2); | 83 var rq2 = store.put('b', 2); |
84 rq2.onsuccess = t.step_func(() => saw('rq2.onsuccess')); | 84 rq2.onsuccess = t.step_func(() => saw('rq2.onsuccess')); |
85 rq2.onerror = t.unreached_func('request should succeed'); | 85 rq2.onerror = t.unreached_func('request should succeed'); |
86 }); | 86 }); |
87 }, | 87 }, |
88 'Multiple transactions without requests complete in the expected order'); | 88 'Multiple transactions without requests complete in the expected order'); |
89 </script> | 89 </script> |
OLD | NEW |