blob: 02686618e3056224933212e1b957b3555944e165 [file] [log] [blame]
Test that integer versions are encoded/decoded consistently.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
indexedDB.deleteDatabase(dbname)
openFirstTime():
version = 1
upgradeNeededFired = false
request = indexedDB.open(dbname, version)
upgradeNeededFired = true
db = request.result
PASS db.version is version
PASS upgradeNeededFired is true
db = request.result
PASS db.version is version
db.close()
openSecondTime():
request = indexedDB.open(dbname)
db = request.result
PASS db.version is version
db.close()
openFirstTime():
version = 127
upgradeNeededFired = false
request = indexedDB.open(dbname, version)
upgradeNeededFired = true
db = request.result
PASS db.version is version
PASS upgradeNeededFired is true
db = request.result
PASS db.version is version
db.close()
openSecondTime():
request = indexedDB.open(dbname)
db = request.result
PASS db.version is version
db.close()
openFirstTime():
version = 128
upgradeNeededFired = false
request = indexedDB.open(dbname, version)
upgradeNeededFired = true
db = request.result
PASS db.version is version
PASS upgradeNeededFired is true
db = request.result
PASS db.version is version
db.close()
openSecondTime():
request = indexedDB.open(dbname)
db = request.result
PASS db.version is version
db.close()
openFirstTime():
version = 2147483648
upgradeNeededFired = false
request = indexedDB.open(dbname, version)
upgradeNeededFired = true
db = request.result
PASS db.version is version
PASS upgradeNeededFired is true
db = request.result
PASS db.version is version
db.close()
openSecondTime():
request = indexedDB.open(dbname)
db = request.result
PASS db.version is version
db.close()
openFirstTime():
version = 9007199254740991
upgradeNeededFired = false
request = indexedDB.open(dbname, version)
upgradeNeededFired = true
db = request.result
PASS db.version is version
PASS upgradeNeededFired is true
db = request.result
PASS db.version is version
db.close()
openSecondTime():
request = indexedDB.open(dbname)
db = request.result
PASS db.version is version
db.close()
openFirstTime():
PASS successfullyParsed is true
TEST COMPLETE