blob: 5d01e2f4f3ec8f744bff5ff3fccd1a2022a84ef4 [file] [log] [blame]
<!-- webkit-test-runner [ useEphemeralSession=true ] -->
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script src="resources/shared.js"></script>
</head>
<body>
<script>
if (window.internals)
window.internals.settings.setIndexedDBWorkersEnabled(true);
description("Regression test for WK82678 - don't commit after a blocked event");
indexedDBTest(prepareDatabase, holdConnection);
function prepareDatabase()
{
db = event.target.result;
evalAndLog("db.onversionchange = onVersionChange");
evalAndLog("store = db.createObjectStore('store1')");
}
function holdConnection()
{
debug("");
debug("holdConnection():");
debug("holding connection until versionchange event");
debug("");
worker = startWorker("resources/dont-commit-on-blocked-worker.js");
}
function onVersionChange(e)
{
// Timing of logging from worker vs. this event is racy, so do not log here.
db.close();
}
</script>
</body>
</html>