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

Unified Diff: LayoutTests/storage/indexeddb/mozilla/resources/getAll_test_adapter.js

Issue 1312983006: Import Mozilla's IndexedDB getAll/getAllKeys tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment update/whitespace Created 5 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/mozilla/resources/test_getAll.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/storage/indexeddb/mozilla/resources/getAll_test_adapter.js
diff --git a/LayoutTests/storage/indexeddb/mozilla/resources/getAll_test_adapter.js b/LayoutTests/storage/indexeddb/mozilla/resources/getAll_test_adapter.js
new file mode 100644
index 0000000000000000000000000000000000000000..285db615aefd7b7027061e3245ff100246f13b2e
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/mozilla/resources/getAll_test_adapter.js
@@ -0,0 +1,43 @@
+'use strict';
+
+// Adapter for Mozilla's getAll tests to Blink's js-test.
+
+var jsTestIsAsync = true;
+
+// Moz tests are still prefixed
+IDBObjectStore.prototype.mozGetAll = IDBObjectStore.prototype.getAll;
+IDBObjectStore.prototype.mozGetAllKeys = IDBObjectStore.prototype.getAllKeys;
+IDBIndex.prototype.mozGetAll = IDBIndex.prototype.getAll;
+IDBIndex.prototype.mozGetAllKeys = IDBIndex.prototype.getAllKeys;
+
+function errorHandler(e) {
+ testFailed("Unexpected error: " + e.type + " - " + e.message);
+ finishJSTest();
+}
+function ok(t, message) {
+ if (!t) {
+ testFailed(message);
+ finishJSTest();
+ } else {
+ testPassed(message);
+ }
+}
+function is(a, b, message) {
+ ok(Object.is(a, b), message);
+}
+function grabEventAndContinueHandler(e) {
+ testGenerator.next(e);
+}
+function executeSoon(f) {
+ setTimeout(f, 0);
+}
+function finishTest() {
+ finishJSTest();
+}
+function unexpectedSuccessHandler(e) {
+ ok(false, "Unexpected success");
+}
+function info(message) {
+ debug(message);
+}
+testGenerator.next();
« no previous file with comments | « no previous file | LayoutTests/storage/indexeddb/mozilla/resources/test_getAll.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698