[Webkit-unassigned] [Bug 62414] IndexedDB: createObjectStore() name argument is required

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 20:40:40 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62414





--- Comment #6 from Kentaro Hara <haraken at google.com>  2011-06-20 20:40:40 PST ---
(From update of attachment 97696)
View in context: https://bugs.webkit.org/attachment.cgi?id=97696&action=review

>> LayoutTests/storage/indexeddb/create-and-delete-object-store.html:20
>> +    indexedDB = evalAndLog("indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;");
> 
> I think you need less evalAndLog here. Just log results that are pertinent to the test.

This is how other indexeddb tests do it too. I would like to wait other reviewers' opinions.

>> LayoutTests/storage/indexeddb/create-and-delete-object-store.html:58
>> +    debug("objectStore.name.length is " + store.name.length);
> 
> This feels redundant. You could just use shouldBe and test that the string has the right value and length in one go.

Done.

>> LayoutTests/storage/indexeddb/create-and-delete-object-store.html:76
>> +    evalAndExpectException("db.deleteObjectStore()", "IDBDatabaseException.NON_TRANSIENT_ERR");
> 
> How is this different to what you’re testing on the previous line?

Done. Removed this line.

>> LayoutTests/storage/indexeddb/create-and-delete-object-store.html:94
>> +    store = evalAndLog("store = db.createObjectStore('undefined')");
> 
> I think this test would be more readable if you did something like:
> 
> var validNames = ['null', 'undefined', 'valid_name'];
> validNames.forEach(function (name) {
>   // same assertions in here
> }, this);
> 
> to emphasize that these should behave the same. It will make the test shorter, too.

Done.

> Source/WebCore/storage/IDBDatabase.cpp:82
> +    if (name.isNull() || name.isEmpty()) {

I removed name.isEmpty() in the latest patch, since an empty string is a valid keypath according to the spec.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list