Test that bad version parameters cause TypeError
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
dbname = "intversion-bad-parameters.html"
indexedDB.deleteDatabase(dbname)
deleteSuccess():
Expecting TypeError exception from indexedDB.open(dbname, 'stringversion')
PASS Exception was thrown.
PASS indexedDB.open(dbname, 'stringversion') threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is not of type 'unsigned long long'.
Expecting TypeError exception from indexedDB.open(dbname, 0)
PASS Exception was thrown.
PASS indexedDB.open(dbname, 0) threw TypeError: Failed to execute 'open' on 'IDBFactory': The version provided must not be 0.
Expecting TypeError exception from indexedDB.open(dbname, -5)
PASS Exception was thrown.
PASS indexedDB.open(dbname, -5) threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is outside the 'unsigned long long' value range.
Expecting TypeError exception from indexedDB.open(dbname, Infinity)
PASS Exception was thrown.
PASS indexedDB.open(dbname, Infinity) threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is infinite and not of type 'unsigned long long'.
Expecting TypeError exception from indexedDB.open(dbname, -Infinity)
PASS Exception was thrown.
PASS indexedDB.open(dbname, -Infinity) threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is infinite and not of type 'unsigned long long'.
Expecting TypeError exception from indexedDB.open(dbname, NaN)
PASS Exception was thrown.
PASS indexedDB.open(dbname, NaN) threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is not of type 'unsigned long long'.
Expecting TypeError exception from indexedDB.open(dbname, -1)
PASS Exception was thrown.
PASS indexedDB.open(dbname, -1) threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is outside the 'unsigned long long' value range.
Expecting TypeError exception from indexedDB.open(dbname, 0x20000000000000)
PASS Exception was thrown.
PASS indexedDB.open(dbname, 0x20000000000000) threw TypeError: Failed to execute 'open' on 'IDBFactory': Value is outside the 'unsigned long long' value range.
Expecting TypeError exception from indexedDB.open(dbname, null)
PASS Exception was thrown.
PASS indexedDB.open(dbname, null) threw TypeError: Failed to execute 'open' on 'IDBFactory': The version provided must not be 0.
PASS indexedDB.open(dbname, undefined) did not throw exception.
PASS successfullyParsed is true
TEST COMPLETE