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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 19 20:55:54 PDT 2011


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





--- Comment #3 from Dominic Cooney <dominicc at chromium.org>  2011-06-19 20:55:54 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:18
> +function test()

Do these tests need to use the moz- prefixed names? This is a WebKit test. Or is this how other tests in this suite do it?

> 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.

> 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.

> 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?

> 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.

-- 
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