Source/WebCore/ChangeLog

 12011-06-10 Mark Pilgrim <pilgrim@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 IndexedDB: indexedDB.open() name argument is required
 6 https://bugs.webkit.org/show_bug.cgi?id=62398
 7
 8 Test: storage/indexeddb/database-name-undefined.html
 9
 10 * storage/IDBFactory.idl: use appropriate IDL magic to force undefined values to null, so we handle missing arguments as well as null arguments
 11
1122011-06-10 Luke Macpherson <macpherson@chromium.org>
213
314 Reviewed by Eric Seidel.
88553

Source/WebCore/storage/IDBFactory.idl

@@module storage {
2828 interface [
2929 Conditional=INDEXED_DATABASE
3030 ] IDBFactory {
31  [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertNullToNullString] DOMString name)
 31 [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertUndefinedOrNullToNullString] DOMString name)
3232 raises (IDBDatabaseException);
3333 };
3434
88181

LayoutTests/ChangeLog

 12011-06-10 Mark Pilgrim <pilgrim@chromium.org>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 IndexedDB: indexedDB.open() name argument is required
 6 https://bugs.webkit.org/show_bug.cgi?id=62398
 7
 8 * storage/indexeddb/database-name-undefined-expected.txt: Added.
 9 * storage/indexeddb/database-name-undefined.html: Added.
 10
1112011-06-10 Abhishek Arya <inferno@chromium.org>
212
313 Reviewed by Tony Gentilcore.
88553

LayoutTests/storage/indexeddb/database-name-undefined-expected.txt

 1Test IndexedDB undefined as record value
 2
 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 4
 5
 6indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
 7PASS indexedDB == null is false
 8IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;
 9PASS IDBDatabaseException == null is false
 10IDBCursor = window.IDBCursor || window.webkitIDBCursor;
 11PASS IDBCursor == null is false
 12IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;
 13PASS IDBKeyRange == null is false
 14Expecting exception from indexedDB.open();
 15PASS Exception was thrown.
 16PASS code is IDBDatabaseException.NON_TRANSIENT_ERR
 17PASS successfullyParsed is true
 18
 19TEST COMPLETE
 20
0

LayoutTests/storage/indexeddb/database-name-undefined.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
 5<script src="../../fast/js/resources/js-test-pre.js"></script>
 6<script src="../../fast/js/resources/js-test-post-function.js"></script>
 7<script src="resources/shared.js"></script>
 8</head>
 9<body>
 10<p id="description"></p>
 11<div id="console"></div>
 12<script>
 13
 14description("Test IndexedDB undefined as record value");
 15if (window.layoutTestController)
 16 layoutTestController.waitUntilDone();
 17
 18function test()
 19{
 20 indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
 21 shouldBeFalse("indexedDB == null");
 22 IDBDatabaseException = evalAndLog("IDBDatabaseException = window.IDBDatabaseException || window.webkitIDBDatabaseException;");
 23 shouldBeFalse("IDBDatabaseException == null");
 24 IDBCursor = evalAndLog("IDBCursor = window.IDBCursor || window.webkitIDBCursor;");
 25 shouldBeFalse("IDBCursor == null");
 26 IDBKeyRange = evalAndLog("IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;");
 27 shouldBeFalse("IDBKeyRange == null");
 28
 29 evalAndExpectException("indexedDB.open();", "IDBDatabaseException.NON_TRANSIENT_ERR");
 30 done();
 31}
 32
 33var successfullyParsed = true;
 34
 35test();
 36
 37</script>
 38</body>
 39</html>
0