blob: 9dd0cfa1d67cb2f886e67c9ebad074da162a429f [file] [log] [blame]
Regression test to ensure that IndexedDB connections don't leak
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "connection-leak.html"
doFirstOpen():
request = indexedDB.open(dbname, 1)
sawUpgradeNeeded1 = false
onUpgradeNeeded1():
sawUpgradeNeeded1 = true
onOpenSuccess1():
PASS sawUpgradeNeeded1 is true
db = request.result
db.close()
doSecondOpen():
request = indexedDB.open(dbname, 1)
onOpenSuccess2():
db = request.result
db = null
request = null
Run GC outside of request's callback via setTimeout()
window.gc()
doThirdOpen():
request = indexedDB.open(dbname, 2)
sawUpgradeNeeded3 = false
onUpgradeNeeded2():
sawUpgradeNeeded3 = true
onOpenSuccess3():
PASS sawUpgradeNeeded3 is true
db = request.result
db.close()
PASS successfullyParsed is true
TEST COMPLETE