OLD | NEW |
| (Empty) |
1 'use strict'; | |
2 | |
3 // Adapter for Mozilla's getAll tests to Blink's js-test. | |
4 | |
5 var jsTestIsAsync = true; | |
6 | |
7 // Moz tests are still prefixed | |
8 IDBObjectStore.prototype.mozGetAll = IDBObjectStore.prototype.getAll; | |
9 IDBObjectStore.prototype.mozGetAllKeys = IDBObjectStore.prototype.getAllKeys; | |
10 IDBIndex.prototype.mozGetAll = IDBIndex.prototype.getAll; | |
11 IDBIndex.prototype.mozGetAllKeys = IDBIndex.prototype.getAllKeys; | |
12 | |
13 function errorHandler(e) { | |
14 testFailed("Unexpected error: " + e.type + " - " + e.message); | |
15 finishJSTest(); | |
16 } | |
17 function ok(t, message) { | |
18 if (!t) { | |
19 testFailed(message); | |
20 finishJSTest(); | |
21 } else { | |
22 testPassed(message); | |
23 } | |
24 } | |
25 function is(a, b, message) { | |
26 ok(Object.is(a, b), message); | |
27 } | |
28 function grabEventAndContinueHandler(e) { | |
29 testGenerator.next(e); | |
30 } | |
31 function executeSoon(f) { | |
32 setTimeout(f, 0); | |
33 } | |
34 function finishTest() { | |
35 finishJSTest(); | |
36 } | |
37 function unexpectedSuccessHandler(e) { | |
38 ok(false, "Unexpected success"); | |
39 } | |
40 function info(message) { | |
41 debug(message); | |
42 } | |
43 testGenerator.next(); | |
OLD | NEW |