http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-construct states "For purposes of comparison, all Arrays are greater than all DOMString, Date and float values; all DOMString values are greater than all Date and float values; and all Date values are greater than all float values." Further, http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#dfn-object-store states "Each record consists of a key and a value. The list is sorted according to key in ascending order." This test adds a number of keys not in sorted order, then opens and iterates a cursor to check that the keys appear in sorted order according ot the sort rules laid out in the spec. WebKit passes this test.
Created attachment 96441 [details] Patch
LGTM This reminded me that we don't handle Date yet.
(In reply to comment #2) > LGTM > > This reminded me that we don't handle Date yet. I guess bug 62300 proves this statement incorrect. Why does this test not include comparing dates to these other types? Just how the mozilla tests were?
Actually we're done with the Mozilla tests; these are original tests I made up last week (and am just getting around to uploading now). I could add some dates, but I'd have to change how we're comparing values since new Date(0) != new Date(0) in JavaScript.
(In reply to comment #4) > Actually we're done with the Mozilla tests; these are original tests I made up last week (and am just getting around to uploading now). Hey, congratulations. (Now I see that your usual link to the mozilla test isn't present here.) > > I could add some dates, but I'd have to change how we're comparing values since new Date(0) != new Date(0) in JavaScript. Following up in bug 62300.
Comment on attachment 96441 [details] Patch Clearing flags on attachment: 96441 Committed r88397: <http://trac.webkit.org/changeset/88397>
All reviewed patches have been landed. Closing bug.
(In reply to comment #2) > This reminded me that we don't handle Date yet. I thought we did support dates. Am I missing something?
(In reply to comment #8) > (In reply to comment #2) > > This reminded me that we don't handle Date yet. > > I thought we did support dates. Am I missing something? We do, you're not missing anything. I had a vague recollection of seeing a TODO somewhere that talked about *something* not supporting dates. Now I'm trying to remember what that was about.
LayoutTests/storage/indexedb/tutorial.html mentions that WebKit does not support dates or arrays. // Keys can be integers, strings, or null. (The spec also defines dates and there's talk of // handling arrays, but these are not implemented yet in Chromium/WebKit.) I'd be happy to open another bug about updating the tutorial with current information, if you like.
(In reply to comment #10) > LayoutTests/storage/indexedb/tutorial.html mentions that WebKit does not support dates or arrays. > > > // Keys can be integers, strings, or null. (The spec also defines dates and there's talk of > // handling arrays, but these are not implemented yet in Chromium/WebKit.) > > I'd be happy to open another bug about updating the tutorial with current information, if you like. Sure!