Modern IDB: Memory indexes aren't deleted when their owning memory object stores...
[WebKit-https.git] / LayoutTests / storage / indexeddb / modern / resources / memory-index-not-deleted-with-objectstore.js
1 description("Makes sure that when an in-memory object store is deleted, any in-memory indexes it has are also deleted. If the test does not crash, it passes.");
2
3 indexedDBTest(prepareDatabase, versionChangeDone);
4
5 function prepareDatabase()
6 {
7     evalAndLog("connection = event.target.result;");
8
9     for (var i = 0; i < 50; ++i) {
10         evalAndLog("store = connection.createObjectStore('name');");
11         evalAndLog("index = store.createIndex('name', 'foo');");
12         deleteAllObjectStores(connection);
13     }
14 }
15
16 function versionChangeDone()
17 {
18     finishJSTest();
19 }