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

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

Issue 2664623002: Upstream an assortment of IndexedDB tests to WPT. (Closed)
Patch Set: Rebase MANIFEST.json. Created 3 years, 10 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 var tx = open.transaction; 121 var tx = open.transaction;
122 upgrade_func(t, db, tx); 122 upgrade_func(t, db, tx);
123 }); 123 });
124 open.onsuccess = t.step_func(function() { 124 open.onsuccess = t.step_func(function() {
125 var db = open.result; 125 var db = open.result;
126 if (open_func) 126 if (open_func)
127 open_func(t, db); 127 open_func(t, db);
128 }); 128 });
129 }, description); 129 }, description);
130 } 130 }
131
132 // Call with a Test and an array of expected results in order. Returns
133 // a function; call the function when a result arrives and when the
134 // expected number appear the order will be asserted and test
135 // completed.
136 function expect(t, expected) {
137 var results = [];
138 return result => {
139 results.push(result);
140 if (results.length === expected.length) {
141 assert_array_equals(results, expected);
142 t.done();
143 }
144 };
145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698