3 original test: http://mxr.mozilla.org/mozilla2.0/source/dom/indexedDB/test/test_open_empty_db.html?force=1
4 license of original test:
5 " Any copyright is dedicated to the Public Domain.
6 http://creativecommons.org/publicdomain/zero/1.0/ "
10 <script src="../../../fast/js/resources/js-test-pre.js"></script>
11 <script src="../resources/shared.js"></script>
14 <p id="description"></p>
15 <div id="console"></div>
18 description("Test IndexedDB: should NOT throw when opening a database with a null name");
19 if (window.layoutTestController)
20 layoutTestController.waitUntilDone();
24 indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
25 shouldBeFalse("indexedDB == null");
26 IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
27 shouldBeFalse("IDBDatabaseException == null");
28 IDBTransaction = evalAndLog("IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;");
29 shouldBeFalse("IDBTransaction == null");
31 description = "My Test Database";
32 request = evalAndLog("indexedDB.open(null);");
33 request.onsuccess = openSuccess;
34 request.onerror = unexpectedErrorCallback;
37 function openSuccess()
39 db = evalAndLog("db = event.target.result");
40 shouldBe("db.name", "'null'");