Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc

Issue 2786463002: [IndexedDB] Fix cursor pooling IsValid(). (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/indexed_db/leveldb/leveldb_iterator_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc
diff --git a/content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc b/content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc
index 43a9ba056cbc1e2325e13b3595455113b80dca42..d4870f13cf4c56f5081aeca29512b1b8d59c6f30 100644
--- a/content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_transaction_unittest.cc
@@ -250,8 +250,6 @@ TEST_F(LevelDBTransactionTest, IterationWithEvictedCursors) {
EXPECT_FALSE(evicted_normal_location->IsDetached());
EXPECT_FALSE(evicted_before_start->IsDetached());
EXPECT_FALSE(evicted_after_end->IsDetached());
- EXPECT_FALSE(evicted_before_start->IsValid());
- EXPECT_FALSE(evicted_after_end->IsValid());
// Should purge all of our earlier iterators.
it1->Seek("key1");
@@ -262,6 +260,10 @@ TEST_F(LevelDBTransactionTest, IterationWithEvictedCursors) {
EXPECT_TRUE(evicted_before_start->IsDetached());
EXPECT_TRUE(evicted_after_end->IsDetached());
+ EXPECT_FALSE(evicted_before_start->IsValid());
+ EXPECT_TRUE(evicted_normal_location->IsValid());
+ EXPECT_FALSE(evicted_after_end->IsValid());
+
// Check we don't need to reload for just the key.
EXPECT_EQ("key1", evicted_normal_location->Key());
EXPECT_TRUE(evicted_normal_location->IsDetached());
« no previous file with comments | « content/browser/indexed_db/leveldb/leveldb_iterator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698