1 if (this.importScripts) {
2 importScripts('../../../resources/js-test.js');
3 importScripts('shared.js');
6 description("Test that initial version after a successful open of a non-existent db is 1");
12 request = evalAndLog("indexedDB.deleteDatabase(dbname)");
13 request.onsuccess = deleteSuccess;
14 request.onerror = unexpectedErrorCallback;
17 function deleteSuccess(evt) {
18 request = evalAndLog("indexedDB.open(dbname)");
19 request.onsuccess = openSuccess;
20 request.onerror = unexpectedErrorCallback;
21 request.onblocked = unexpectedBlockedCallback;
22 request.onupgradeneeded = function() {
23 testPassed("Got upgradeneeded event");
27 function openSuccess(evt)
31 debug("openSuccess():");
32 db = evalAndLog("db = event.target.result");
33 debug("Test line from IDBFactory.open: If no version is specified and no database exists, set database version to 1.");
34 shouldBe('db.version', '1');