| Index: third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
|
| index 4bfaf72caa590ee11ed28ec16ef52db3248e4df2..f1c599c07b20c02df477c8c0b339db4a956c7bcc 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
|
| @@ -128,3 +128,18 @@ function indexeddb_test(upgrade_func, open_func, description, options) {
|
| });
|
| }, description);
|
| }
|
| +
|
| +// Call with a Test and an array of expected results in order. Returns
|
| +// a function; call the function when a result arrives and when the
|
| +// expected number appear the order will be asserted and test
|
| +// completed.
|
| +function expect(t, expected) {
|
| + var results = [];
|
| + return result => {
|
| + results.push(result);
|
| + if (results.length === expected.length) {
|
| + assert_array_equals(results, expected);
|
| + t.done();
|
| + }
|
| + };
|
| +}
|
|
|