Changeset 193968 in webkit


Ignore:
Timestamp:
Dec 11, 2015 11:13:38 AM (8 years ago)
Author:
beidson@apple.com
Message:

Modern IDB: storage/indexeddb/index-count.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152175

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

  • Modules/indexeddb/client/IDBIndexImpl.cpp:

(WebCore::IDBClient::IDBIndex::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
(WebCore::IDBClient::IDBIndex::doCount): Change an isNull check to a more correct !isValid() check.

LayoutTests:

  • platform/mac-wk1/TestExpectations:
  • storage/indexeddb/index-count-expected.txt:
  • storage/indexeddb/modern/index-get-count-failures-expected.txt:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r193958 r193968  
     12015-12-11  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: storage/indexeddb/index-count.html fails.
     4        https://bugs.webkit.org/show_bug.cgi?id=152175
     5
     6        Reviewed by Alex Christensen.
     7
     8        * platform/mac-wk1/TestExpectations:
     9        * storage/indexeddb/index-count-expected.txt:
     10        * storage/indexeddb/modern/index-get-count-failures-expected.txt:
     11
    1122015-12-11  Daniel Bates  <dabates@apple.com>
    213
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r193949 r193968  
    9797storage/indexeddb/delete-closed-database-object.html [ Failure ]
    9898storage/indexeddb/index-basics.html [ Failure ]
    99 storage/indexeddb/index-count.html [ Failure ]
    10099storage/indexeddb/index-duplicate-keypaths.html [ Failure ]
    101100storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html [ Failure ]
  • trunk/LayoutTests/storage/indexeddb/index-count-expected.txt

    r164014 r193968  
    8989PASS code is 0
    9090PASS ename is 'DataError'
    91 Exception message: DataError: DOM IDBDatabase Exception 0
     91Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
    9292Expecting exception from index.count({})
    9393PASS Exception was thrown.
    9494PASS code is 0
    9595PASS ename is 'DataError'
    96 Exception message: DataError: DOM IDBDatabase Exception 0
     96Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
    9797Expecting exception from index.count(/regex/)
    9898PASS Exception was thrown.
    9999PASS code is 0
    100100PASS ename is 'DataError'
    101 Exception message: DataError: DOM IDBDatabase Exception 0
     101Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
    102102
    103103test = {"key":0,"expected":1}
  • trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt

    r192645 r193968  
    33Failed to get with a null key
    44Failed to getKey with a null key
    5 Failed to count with a null range
    65Failed to get with deleted IDBIndex
    76Failed to getKey with deleted IDBIndex
  • trunk/Source/WebCore/ChangeLog

    r193959 r193968  
     12015-12-11  Brady Eidson  <beidson@apple.com>
     2
     3        Modern IDB: storage/indexeddb/index-count.html fails.
     4        https://bugs.webkit.org/show_bug.cgi?id=152175
     5
     6        Reviewed by Alex Christensen.
     7
     8        No new tests (At least one failing test now passes).
     9
     10        * Modules/indexeddb/client/IDBIndexImpl.cpp:
     11        (WebCore::IDBClient::IDBIndex::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
     12        (WebCore::IDBClient::IDBIndex::doCount): Change an isNull check to a more correct !isValid() check.
     13
    1142015-12-11  Per Arne Vollan  <peavo@outlook.com>
    215
  • trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp

    r193428 r193968  
    140140    }
    141141
    142     IDBKeyRangeData range;
    143     range.isNull = false;
    144     return doCount(*context, range, ec);}
     142    return doCount(*context, IDBKeyRangeData::allKeys(), ec);}
    145143
    146144RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
     
    153151    }
    154152
    155     return doCount(*context, IDBKeyRangeData(range), ec);
     153    return doCount(*context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
    156154}
    157155
     
    183181    }
    184182
    185     if (range.isNull) {
     183    if (!range.isValid()) {
    186184        ec.code = IDBDatabaseException::DataError;
    187185        return nullptr;
Note: See TracChangeset for help on using the changeset viewer.