Changeset 89506 in webkit


Ignore:
Timestamp:
Jun 22, 2011, 5:57:42 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-22 Mark Pilgrim <pilgrim@chromium.org>

Reviewed by Adam Barth.

IndexedDB open (database) should NOT throw if name is null
https://bugs.webkit.org/show_bug.cgi?id=63110

  • storage/indexeddb/database-name-undefined-expected.txt:
  • storage/indexeddb/database-name-undefined.html: removed some code here because it's duplicated in the mozilla/open-database-null-name test
  • storage/indexeddb/mozilla/open-database-null-name-expected.txt:
  • storage/indexeddb/mozilla/open-database-null-name.html: fixed expected behavior (db.name ends up as four-character string "null")

2011-06-22 Mark Pilgrim <pilgrim@chromium.org>

Reviewed by Adam Barth.

IndexedDB open (database) should NOT throw if name is null
https://bugs.webkit.org/show_bug.cgi?id=63110

  • storage/IDBFactory.idl: remove ConvertNullToNullString flag on name argument, let IDL code generator stringify null value to "null"
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r89503 r89506  
     12011-06-22  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        IndexedDB open (database) should NOT throw if name is null
     6        https://bugs.webkit.org/show_bug.cgi?id=63110
     7
     8        * storage/indexeddb/database-name-undefined-expected.txt:
     9        * storage/indexeddb/database-name-undefined.html: removed some code here
     10        because it's duplicated in the mozilla/open-database-null-name test
     11        * storage/indexeddb/mozilla/open-database-null-name-expected.txt:
     12        * storage/indexeddb/mozilla/open-database-null-name.html: fixed expected
     13        behavior (db.name ends up as four-character string "null")
     14
    1152011-06-22  Nate Chapin  <japhet@chromium.org>
    216
  • trunk/LayoutTests/storage/indexeddb/database-name-undefined-expected.txt

    r89378 r89506  
    1313PASS IDBKeyRange == null is false
    1414PASS indexedDB.open(); threw exception TypeError: Not enough arguments.
    15 PASS indexedDB.open(null); threw exception Error: NON_TRANSIENT_ERR: DOM IDBDatabase Exception 2.
    1615PASS successfullyParsed is true
    1716
  • trunk/LayoutTests/storage/indexeddb/database-name-undefined.html

    r89378 r89506  
    2828
    2929    shouldThrow("indexedDB.open();");
    30     shouldThrow("indexedDB.open(null);");
    3130    done();
    3231}
  • trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name-expected.txt

    r85770 r89506  
    1 Test IndexedDB: should throw when opening a database with a null name
     1Test IndexedDB: should NOT throw when opening a database with a null name
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    1010IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction;
    1111PASS IDBTransaction == null is false
    12 Expecting exception from indexedDB.open(null, description)
    13 PASS Exception was thrown.
    14 PASS code is IDBDatabaseException.NON_TRANSIENT_ERR
     12indexedDB.open(null);
     13db = event.target.result
     14PASS db.name is 'null'
    1515PASS successfullyParsed is true
    1616
  • trunk/LayoutTests/storage/indexeddb/mozilla/open-database-null-name.html

    r85770 r89506  
    1818<script>
    1919
    20 description("Test IndexedDB: should throw when opening a database with a null name");
     20description("Test IndexedDB: should NOT throw when opening a database with a null name");
    2121if (window.layoutTestController)
    2222    layoutTestController.waitUntilDone();
     
    3232
    3333    description = "My Test Database";
    34     evalAndExpectException("indexedDB.open(null, description)", "IDBDatabaseException.NON_TRANSIENT_ERR");
     34    request = evalAndLog("indexedDB.open(null);");
     35    request.onsuccess = openSuccess;
     36    request.onerror = unexpectedErrorCallback;
     37}
     38
     39function openSuccess()
     40{
     41    db = evalAndLog("db = event.target.result");
     42    shouldBe("db.name", "'null'");
    3543    done();
    3644}
  • trunk/Source/WebCore/ChangeLog

    r89505 r89506  
     12011-06-22  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        IndexedDB open (database) should NOT throw if name is null
     6        https://bugs.webkit.org/show_bug.cgi?id=63110
     7
     8        * storage/IDBFactory.idl: remove ConvertNullToNullString flag on
     9        name argument, let IDL code generator stringify null value to "null"
     10
    1112011-06-22  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/storage/IDBFactory.idl

    r89378 r89506  
    2929        Conditional=INDEXED_DATABASE
    3030    ] IDBFactory {
    31         [CallWith=ScriptExecutionContext] IDBRequest open(in [ConvertNullToNullString] DOMString name)
     31        [CallWith=ScriptExecutionContext] IDBRequest open(in DOMString name)
    3232            raises (IDBDatabaseException);
    3333    };
Note: See TracChangeset for help on using the changeset viewer.