Closed thejuan closed 11 years ago
Using Qunit, asyncTests and Chrome 26.0.1410.64 m
The following test fails when loaded in browser, after a refresh or two it will run successfully. Upon first load it hangs on the 2nd test.
QUnit.module("jQuery.IndexedDB 2", { setup: function () { stop(); $.indexedDB("Test").deleteDatabase().then(function () { return $.indexedDB("Test", { "version": 1, "upgrade": function (transaction) { }, "schema": { "1": function (transaction) { console.log("Creating Schema Version 1"); var objectStore = transaction.createObjectStore("AnObjectStore", { keyPath: "id", autoIncrement: false }); objectStore.createIndex("indexId", { unique: false }, "An Index"); } } }); }).then(function () { return start(); }).fail(function (e) { return console.error(e); }); } }); QUnit.asyncTest("test1", function () { $.indexedDB("Test").objectStore("AnObjectStore").add({ id: 1, indexId: "a" }).done(function () { start(); ok(true, "Done"); }); }); QUnit.asyncTest("test2", function () { $.indexedDB("Test").objectStore("AnObjectStore").add({ id: 2, indexId: "b" }).done(function () { start(); ok(true, "Done"); }); }); QUnit.asyncTest("test3", function () { $.indexedDB("Test").objectStore("AnObjectStore").add({ id: 3, indexId: "c" }).done(function () { start(); ok(true, "Done"); }); });
Can you check if this still happens? Not able to reproduce this. please reopen bug if you still see this.
Latest recent version of chrome seemed to fix it.
Using Qunit, asyncTests and Chrome 26.0.1410.64 m
The following test fails when loaded in browser, after a refresh or two it will run successfully. Upon first load it hangs on the 2nd test.
QUnit.module("jQuery.IndexedDB 2", { setup: function () { stop(); $.indexedDB("Test").deleteDatabase().then(function () { return $.indexedDB("Test", { "version": 1, "upgrade": function (transaction) { }, "schema": { "1": function (transaction) { console.log("Creating Schema Version 1"); var objectStore = transaction.createObjectStore("AnObjectStore", { keyPath: "id", autoIncrement: false }); objectStore.createIndex("indexId", { unique: false }, "An Index"); } } }); }).then(function () { return start(); }).fail(function (e) { return console.error(e); }); } }); QUnit.asyncTest("test1", function () { $.indexedDB("Test").objectStore("AnObjectStore").add({ id: 1, indexId: "a" }).done(function () { start(); ok(true, "Done"); }); }); QUnit.asyncTest("test2", function () { $.indexedDB("Test").objectStore("AnObjectStore").add({ id: 2, indexId: "b" }).done(function () { start(); ok(true, "Done"); }); }); QUnit.asyncTest("test3", function () { $.indexedDB("Test").objectStore("AnObjectStore").add({ id: 3, indexId: "c" }).done(function () { start(); ok(true, "Done"); }); });