1 // Copyright (c) 2013 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.
7 // Do not use indexedDBTest() - need to re-use previous database.
8 var dbname
= "doesnt-hang-test";
9 var request
= indexedDB
.open(dbname
);
10 request
.onerror
= unexpectedErrorCallback
;
11 request
.onblocked
= unexpectedBlockedCallback
;
12 request
.onupgradeneeded
= unexpectedUpgradeNeededCallback
;
13 request
.onsuccess
= onOpenSuccess
;
16 function onOpenSuccess()
18 var db
= event
.target
.result
;
20 debug('Creating new transaction.');
21 var transaction
= db
.transaction('store', 'readwrite');
22 transaction
.onabort
= unexpectedAbortCallback
;
23 var objectStore
= transaction
.objectStore('store');
25 var request
= objectStore
.get(0);
26 request
.onerror
= unexpectedErrorCallback
;
27 request
.onsuccess = function() {
28 debug("request completed successfully");
31 transaction
.oncomplete = function() {
32 debug("transaction completed");