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

Unified 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, 11 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 side-by-side diff with in-line comments
Download patch
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();
+ }
+ };
+}

Powered by Google App Engine
This is Rietveld 408576698