Skip to content
  • commit-queue@webkit.org's avatar
    IndexedDB chooses wrong record on PREV_NO_DUPLICATE index cursor · f319ea71
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=60746
    
    Patch by Alec Flett <alecflett@chromium.org> on 2012-04-17
    Reviewed by Ojan Vafai.
    
    Source/WebCore:
    
    When iterating backwards with PREV_NO_DUPLICATE, keep walking past
    the 'prev' key until it changes, then walk forward one time. This
    covers the object store and index cases.
    
    Test: storage/indexeddb/mozilla/index-prev-no-duplicate.html
    
    * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
    (WebCore):
    
    LayoutTests:
    
    Test for PREV_NO_DUPLICATE.
    
    * storage/indexeddb/cursor-prev-no-duplicate.html: Added.
    * storage/indexeddb/cursor-prev-no-duplicate.txt: Added.
    * storage/indexeddb/mozilla/index-prev-no-duplicate-expected.txt: Added.
    * storage/indexeddb/mozilla/index-prev-no-duplicate.html: Added.
    * storage/indexeddb/resources/cursor-prev-no-duplicate.js: Added.
    (prepareDatabase.openreq.onsuccess.verreq.onsuccess):
    (prepareDatabase.openreq.onsuccess):
    (prepareDatabase):
    (populateStore):
    (runAllTests):
    (waitFor):
    (complete.fireCallback):
    (complete):
    (testFarRangeCursor):
    (makeOpenKeyCursor):
    (runTest.trans.oncomplete):
    (runTest.testFunction):
    (runTest):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f319ea71