1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 indexedDBTest(populateObjectStore);
9 function populateObjectStore()
11 db = event.target.result;
12 debug('Populating object store');
13 window.objectStore = db.createObjectStore('employees', {keyPath: 'id'});
14 shouldBe("objectStore.name", "'employees'");
15 shouldBe("objectStore.keyPath", "'id'");
17 shouldBe('db.name', 'dbname');
18 shouldBe('db.version', '1');
19 shouldBe('db.objectStoreNames.length', '1');
20 shouldBe('db.objectStoreNames[0]', '"employees"');
22 debug('Deleting an object store.');
23 db.deleteObjectStore('employees');
24 shouldBe('db.objectStoreNames.length', '0');