IDB: storage/indexeddb/mozilla/index-prev-no-duplicate.html fails
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 06:07:30 +0000 (06:07 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 06:07:30 +0000 (06:07 +0000)
commit659000880def3301c352c01f46f81b6a35f8c1f1
tree3a3ccdbd1521e07b7b409d9f29ce5cebede5d406
parent997634bf29f58997ecca48ebcf3d354574464add
IDB: storage/indexeddb/mozilla/index-prev-no-duplicate.html fails
<rdar://problem/16018918> and https://bugs.webkit.org/show_bug.cgi?id=128444

Reviewed by Dan Bernstein.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::getIndexStatement): Return different statements for unique cursors that will
  sort the values in reverse of the cursor direction, matching expected IndexedDB behavior.
(WebKit::SQLiteIDBCursor::establishStatement):

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::uncheckedPutIndexRecord): Insert the values as
  strings since we need the collation function to be called for proper sorting.

LayoutTests:

* platform/mac-wk2/TestExpectations: Enable the test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp