Bug 603811 - 'IndexedDB: Implement setVersion changes to the spec'. Fix browser-chrome test, a=testfix.

This commit is contained in:
Ben Turner 2010-10-19 12:14:30 -07:00
Родитель 02072fdffd
Коммит f623aa8ab0
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -35,9 +35,12 @@
function onDone() { function onDone() {
window.removeEventListener("indexedDB-addMore", onAddMore, true); window.removeEventListener("indexedDB-addMore", onAddMore, true);
window.removeEventListener("indexedDB-done", onDone, true); window.removeEventListener("indexedDB-done", onDone, true);
let request = db.removeObjectStore("foo");
let request = db.setVersion("2");
request.onerror = errorHandler; request.onerror = errorHandler;
request.onsuccess = function(event) { request.onsuccess = function(event) {
db.removeObjectStore("foo");
testResult = "finished"; testResult = "finished";
testException = undefined; testException = undefined;
finishTest(); finishTest();
@ -59,11 +62,13 @@
db = event.result; db = event.result;
request = db.createObjectStore("foo", "", true); request = db.setVersion("1");
request.onerror = errorHandler; request.onerror = errorHandler;
request.onsuccess = grabEventAndContinueHandler; request.onsuccess = grabEventAndContinueHandler;
event = yield; event = yield;
db.createObjectStore("foo", "", true);
setTimeout(testFinishedCallback, 0, "ready"); setTimeout(testFinishedCallback, 0, "ready");
yield; yield;
} }