mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Bug 766462: Make some tests wait for all their events. r=me
--HG-- extra : rebase_source : a20e771e60c6855a4bad5067c74bada689d7648a
This commit is contained in:
parent
b63e4fa98c
commit
a6d370d61c
@ -8,7 +8,6 @@ var testGenerator = testSteps();
|
||||
function testSteps()
|
||||
{
|
||||
const name = this.window ? window.location.pathname : "Splendid Test";
|
||||
const description = "My Test Database";
|
||||
const objectStoreInfo = [
|
||||
{ name: "a", options: { keyPath: "id", autoIncrement: true } },
|
||||
{ name: "b", options: { keyPath: "id", autoIncrement: false } },
|
||||
@ -22,9 +21,10 @@ function testSteps()
|
||||
{ name: undefined, keyPath: "value", options: { unique: false } },
|
||||
];
|
||||
|
||||
let request = mozIndexedDB.open(name, 1, description);
|
||||
let request = mozIndexedDB.open(name, 1);
|
||||
request.onerror = errorHandler;
|
||||
request.onupgradeneeded = grabEventAndContinueHandler;
|
||||
request.onsucess = unexpectedSuccessHandler;
|
||||
let event = yield;
|
||||
let db = event.target.result;
|
||||
|
||||
@ -115,6 +115,11 @@ function testSteps()
|
||||
}
|
||||
}
|
||||
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
request.onupgradeneeded = unexpectedSuccessHandler;
|
||||
|
||||
event = yield;
|
||||
|
||||
finishTest();
|
||||
yield;
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ var testGenerator = testSteps();
|
||||
function testSteps()
|
||||
{
|
||||
const name = this.window ? window.location.pathname : "Splendid Test";
|
||||
const description = "My Test Database";
|
||||
const objectStoreInfo = [
|
||||
{ name: "1", options: { keyPath: null } },
|
||||
{ name: "2", options: { keyPath: null, autoIncrement: true } },
|
||||
@ -26,9 +25,10 @@ function testSteps()
|
||||
{ name: undefined }
|
||||
];
|
||||
|
||||
let request = mozIndexedDB.open(name, 1, description);
|
||||
let request = mozIndexedDB.open(name, 1);
|
||||
request.onerror = errorHandler;
|
||||
request.onupgradeneeded = grabEventAndContinueHandler;
|
||||
request.onsuccess = unexpectedSuccessHandler;
|
||||
let event = yield;
|
||||
|
||||
let db = event.target.result;
|
||||
@ -99,6 +99,11 @@ function testSteps()
|
||||
is(found, true, "transaction has correct objectStoreNames list");
|
||||
}
|
||||
|
||||
request.onsuccess = grabEventAndContinueHandler;
|
||||
request.onupgradeneeded = unexpectedSuccessHandler;
|
||||
|
||||
event = yield;
|
||||
|
||||
finishTest();
|
||||
yield;
|
||||
}
|
Loading…
Reference in New Issue
Block a user