Title: [193968] trunk
Revision
193968
Author
beid...@apple.com
Date
2015-12-11 11:13:38 -0800 (Fri, 11 Dec 2015)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (193967 => 193968)


--- trunk/LayoutTests/ChangeLog	2015-12-11 18:26:41 UTC (rev 193967)
+++ trunk/LayoutTests/ChangeLog	2015-12-11 19:13:38 UTC (rev 193968)
@@ -1,3 +1,14 @@
+2015-12-11  Brady Eidson  <beid...@apple.com>
+
+        Modern IDB: storage/indexeddb/index-count.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152175
+
+        Reviewed by Alex Christensen.
+
+        * platform/mac-wk1/TestExpectations:
+        * storage/indexeddb/index-count-expected.txt:
+        * storage/indexeddb/modern/index-get-count-failures-expected.txt:
+
 2015-12-11  Daniel Bates  <daba...@apple.com>
 
         [iOS][WK2] Update expected results for tests imported/w3c/web-platform-tests

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193967 => 193968)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-11 18:26:41 UTC (rev 193967)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2015-12-11 19:13:38 UTC (rev 193968)
@@ -96,7 +96,6 @@
 storage/indexeddb/database-deletepending-flag.html [ Failure ]
 storage/indexeddb/delete-closed-database-object.html [ Failure ]
 storage/indexeddb/index-basics.html [ Failure ]
-storage/indexeddb/index-count.html [ Failure ]
 storage/indexeddb/index-duplicate-keypaths.html [ Failure ]
 storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html [ Failure ]
 storage/indexeddb/intversion-close-in-oncomplete.html [ Failure ]

Modified: trunk/LayoutTests/storage/indexeddb/index-count-expected.txt (193967 => 193968)


--- trunk/LayoutTests/storage/indexeddb/index-count-expected.txt	2015-12-11 18:26:41 UTC (rev 193967)
+++ trunk/LayoutTests/storage/indexeddb/index-count-expected.txt	2015-12-11 19:13:38 UTC (rev 193968)
@@ -88,17 +88,17 @@
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
 Expecting exception from index.count({})
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
 Expecting exception from index.count(/regex/)
 PASS Exception was thrown.
 PASS code is 0
 PASS ename is 'DataError'
-Exception message: DataError: DOM IDBDatabase Exception 0
+Exception message: Failed to execute 'count' on 'IDBIndex': The parameter is not a valid key.
 
 test = {"key":0,"expected":1}
 request = index.count(test.key)

Modified: trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt (193967 => 193968)


--- trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt	2015-12-11 18:26:41 UTC (rev 193967)
+++ trunk/LayoutTests/storage/indexeddb/modern/index-get-count-failures-expected.txt	2015-12-11 19:13:38 UTC (rev 193968)
@@ -2,7 +2,6 @@
 Initial upgrade needed: Old version - 0 New version - 1
 Failed to get with a null key
 Failed to getKey with a null key
-Failed to count with a null range
 Failed to get with deleted IDBIndex
 Failed to getKey with deleted IDBIndex
 Failed to count with deleted IDBIndex

Modified: trunk/Source/WebCore/ChangeLog (193967 => 193968)


--- trunk/Source/WebCore/ChangeLog	2015-12-11 18:26:41 UTC (rev 193967)
+++ trunk/Source/WebCore/ChangeLog	2015-12-11 19:13:38 UTC (rev 193968)
@@ -1,3 +1,16 @@
+2015-12-11  Brady Eidson  <beid...@apple.com>
+
+        Modern IDB: storage/indexeddb/index-count.html fails.
+        https://bugs.webkit.org/show_bug.cgi?id=152175
+
+        Reviewed by Alex Christensen.
+
+        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.
+
 2015-12-11  Per Arne Vollan  <pe...@outlook.com>
 
         [WinCairo][MediaFoundation] Setting playback rate does not work.

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp (193967 => 193968)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp	2015-12-11 18:26:41 UTC (rev 193967)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp	2015-12-11 19:13:38 UTC (rev 193968)
@@ -139,9 +139,7 @@
         return nullptr;
     }
 
-    IDBKeyRangeData range;
-    range.isNull = false;
-    return doCount(*context, range, ec);}
+    return doCount(*context, IDBKeyRangeData::allKeys(), ec);}
 
 RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, IDBKeyRange* range, ExceptionCodeWithMessage& ec)
 {
@@ -152,7 +150,7 @@
         return nullptr;
     }
 
-    return doCount(*context, IDBKeyRangeData(range), ec);
+    return doCount(*context, range ? IDBKeyRangeData(range) : IDBKeyRangeData::allKeys(), ec);
 }
 
 RefPtr<WebCore::IDBRequest> IDBIndex::count(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCodeWithMessage& ec)
@@ -182,7 +180,7 @@
         return nullptr;
     }
 
-    if (range.isNull) {
+    if (!range.isValid()) {
         ec.code = IDBDatabaseException::DataError;
         return nullptr;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to