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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js

Issue 2734533002: IndexedDB: Align abort behavior on uncaught exception with Gecko (Closed)
Patch Set: Test refactors per review Created 3 years, 9 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 var databaseName = "database"; 1 var databaseName = "database";
2 var databaseVersion = 1; 2 var databaseVersion = 1;
3 3
4 /* Delete created databases 4 /* Delete created databases
5 * 5 *
6 * Go through each finished test, see if it has an associated database. Close 6 * Go through each finished test, see if it has an associated database. Close
7 * that and delete the database. */ 7 * that and delete the database. */
8 add_completion_callback(function(tests) 8 add_completion_callback(function(tests)
9 { 9 {
10 for (var i in tests) 10 for (var i in tests)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 function expect(t, expected) { 136 function expect(t, expected) {
137 var results = []; 137 var results = [];
138 return result => { 138 return result => {
139 results.push(result); 139 results.push(result);
140 if (results.length === expected.length) { 140 if (results.length === expected.length) {
141 assert_array_equals(results, expected); 141 assert_array_equals(results, expected);
142 t.done(); 142 t.done();
143 } 143 }
144 }; 144 };
145 } 145 }
146
147 // Checks to see if the passed transaction is active (by making
148 // requests against the named store).
149 function is_transaction_active(tx, store_name) {
150 try {
151 const request = tx.objectStore(store_name).get(0);
152 request.onerror = e => {
153 e.preventDefault();
154 e.stopPropagation();
155 };
156 return true;
157 } catch (ex) {
158 assert_equals(ex.name, 'TransactionInactiveError',
159 'Active check should either not throw anything, or throw ' +
160 'TransactionInactiveError');
161 return false;
162 }
163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698