RESOLVED FIXED 62300
IndexedDB test: key sort order for Date objects
https://bugs.webkit.org/show_bug.cgi?id=62300
Summary IndexedDB test: key sort order for Date objects
Mark Pilgrim (Google)
Reported 2011-06-08 11:24:50 PDT
http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-construct states "Values of type Date are compared to other Date values chronologically." This test creates an objectstore and fills it with Date keys in non-chronological order, then opens and iterates a cursor to verify that the keys appear in chronological order. WebKit passes this test.
Attachments
Patch (6.03 KB, patch)
2011-06-08 11:25 PDT, Mark Pilgrim (Google)
no flags
Mark Pilgrim (Google)
Comment 1 2011-06-08 11:25:52 PDT
David Grogan
Comment 2 2011-06-08 12:56:24 PDT
Comment on attachment 96443 [details] Patch LGTM
David Grogan
Comment 3 2011-06-08 13:31:11 PDT
Comment on attachment 96443 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=96443&action=review LGTM > LayoutTests/storage/indexeddb/key-sort-order-date.html:89 > + shouldBe("cursor.key.toString()", "sortedKeys[keyIndex]"); So the problem with dates is that shouldBe will try to compare Date objects using == ? If so you might be able to use shouldEvaluateTo: shouldEvaluateTo("cursor.key", sortedKeys[keyIndex]) if sortedKeys[keyIndex] holds a date.toString(), the == might call the Date object's toString method before comparing. It's no big deal, the test is fine as is. Only do this if you want to play around with javascript.
Tony Chang
Comment 4 2011-06-08 14:16:06 PDT
Comment on attachment 96443 [details] Patch Mark, if you want to land this patch as-is, please set cq?. Otherwise, just upload a new patch.
WebKit Review Bot
Comment 5 2011-06-08 15:08:08 PDT
Comment on attachment 96443 [details] Patch Clearing flags on attachment: 96443 Committed r88395: <http://trac.webkit.org/changeset/88395>
WebKit Review Bot
Comment 6 2011-06-08 15:08:12 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.