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(); |