Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
1 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 const { 'classes': Cc, 'interfaces': Ci, 'utils': Cu } = Components;
8 let testGenerator = testSteps();
10 if (!window.runTest) {
11 window.runTest = function()
12 {
13 Cu.importGlobalProperties(["indexedDB"]);
15 SimpleTest.waitForExplicitFinish();
17 testGenerator.next();
18 }
19 }
21 function finishTest()
22 {
23 SimpleTest.executeSoon(function() {
24 testGenerator.close();
25 SimpleTest.finish();
26 });
27 }
29 function grabEventAndContinueHandler(event)
30 {
31 testGenerator.send(event);
32 }
34 function continueToNextStep()
35 {
36 SimpleTest.executeSoon(function() {
37 testGenerator.next();
38 });
39 }
41 function errorHandler(event)
42 {
43 throw new Error("indexedDB error, code " + event.target.error.name);
44 }