1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js');
6 description("Test that bad version parameters cause TypeError");
12 request = evalAndLog("indexedDB.deleteDatabase(dbname)");
13 request.onsuccess = deleteSuccess;
14 request.onerror = unexpectedErrorCallback;
17 function deleteSuccess(evt) {
19 evalAndExpectExceptionClass("indexedDB.open(dbname, 'stringversion')", "TypeError");
20 evalAndExpectExceptionClass("indexedDB.open(dbname, 0)", "TypeError");
21 evalAndExpectExceptionClass("indexedDB.open(dbname, -5)", "TypeError");
22 evalAndExpectExceptionClass("indexedDB.open(dbname, Infinity)", "TypeError");
23 evalAndExpectExceptionClass("indexedDB.open(dbname, -Infinity)", "TypeError");
24 evalAndExpectExceptionClass("indexedDB.open(dbname, NaN)", "TypeError");
25 evalAndExpectExceptionClass("indexedDB.open(dbname, -1)", "TypeError");
26 evalAndExpectExceptionClass("indexedDB.open(dbname, 0x20000000000000)", "TypeError");
27 evalAndExpectExceptionClass("indexedDB.open(dbname, null)", "TypeError");
28 evalAndExpectExceptionClass("indexedDB.open(dbname, undefined)", "TypeError");