Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / dont-commit-on-blocked.html
blob9ed3bb314ac785e987f6916e0413811e1ba31638
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script src="resources/shared.js"></script>
5 </head>
6 <body>
7 <script>
9 description("Regression test for WK82678 - don't commit after a blocked event");
11 indexedDBTest(prepareDatabase, holdConnection);
12 function prepareDatabase()
14 db = event.target.result;
15 evalAndLog("db.onversionchange = onVersionChange");
16 evalAndLog("store = db.createObjectStore('store1')");
19 function holdConnection()
21 debug("");
22 debug("holdConnection():");
23 debug("holding connection until versionchange event");
24 debug("");
25 worker = startWorker("resources/dont-commit-on-blocked-worker.js");
28 function onVersionChange(e)
30 // Timing of logging from worker vs. this event is racy, so do not log here.
31 // Don't close within this turn of the event loop, so that worker sees 'blocked'.
32 setTimeout(function() {
33 db.close();
34 }, 0);
37 </script>
38 </body>
39 </html>