OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 function finalTransactionCompleted() | 5 function finalTransactionCompleted() |
6 { | 6 { |
7 debug('The final transaction completed.'); | 7 debug('The final transaction completed.'); |
8 done(); | 8 done(); |
9 } | 9 } |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 { | 62 { |
63 // We are now in a set version transaction. | 63 // We are now in a set version transaction. |
64 window.db = event.target.result; | 64 window.db = event.target.result; |
65 debug('Creating object store.'); | 65 debug('Creating object store.'); |
66 deleteAllObjectStores(db); | 66 deleteAllObjectStores(db); |
67 db.createObjectStore('employees', {keyPath: 'id'}); | 67 db.createObjectStore('employees', {keyPath: 'id'}); |
68 } | 68 } |
69 | 69 |
70 function test() | 70 function test() |
71 { | 71 { |
72 if ('webkitIndexedDB' in window) { | |
73 indexedDB = webkitIndexedDB; | |
74 IDBCursor = webkitIDBCursor; | |
75 IDBKeyRange = webkitIDBKeyRange; | |
76 IDBTransaction = webkitIDBTransaction; | |
77 } | |
78 indexedDBTest(onSetVersion, onSetVersionComplete); | 72 indexedDBTest(onSetVersion, onSetVersionComplete); |
79 } | 73 } |
OLD | NEW |