blob: 3b194bfa9eeefdfd4567c235484cf2543068f880 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<html>
<head>
<script src="../../fast/js/resources/js-test-pre.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("");
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>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
|