37 lines
876 B
HTML
37 lines
876 B
HTML
<!-- webkit-test-runner [ useEphemeralSession=true ] -->
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test.js"></script>
|
|
<script src="resources/shared.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
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>
|