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

Unified Diff: components/leveldb_proto/proto_database_impl_unittest.cc

Issue 2953473002: Use leveldb_env::OpenDB() to open leveldb databases. (Closed)
Patch Set: Rebase; add comments to CHECK() Created 3 years, 5 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
Index: components/leveldb_proto/proto_database_impl_unittest.cc
diff --git a/components/leveldb_proto/proto_database_impl_unittest.cc b/components/leveldb_proto/proto_database_impl_unittest.cc
index c198b50c821381176b97b338c11b3bd75ac15e12..691d774d47a36af4ee977102de4d9a9287fdea5a 100644
--- a/components/leveldb_proto/proto_database_impl_unittest.cc
+++ b/components/leveldb_proto/proto_database_impl_unittest.cc
@@ -647,16 +647,13 @@ TEST(ProtoDatabaseImplLevelDBTest, TestOnMemoryDumpEmitsData) {
new base::trace_event::ProcessMemoryDump(nullptr, dump_args));
db->OnMemoryDump(dump_args, process_memory_dump.get());
- const auto& allocator_dumps = process_memory_dump->allocator_dumps();
- const char* system_allocator_pool_name =
- base::trace_event::MemoryDumpManager::GetInstance()
- ->system_allocator_pool_name();
- size_t expected_dump_count = system_allocator_pool_name ? 2 : 1;
- EXPECT_EQ(expected_dump_count, allocator_dumps.size());
- for (const auto& dump : allocator_dumps) {
- ASSERT_TRUE(dump.first.find("leveldb/leveldb_proto/") == 0 ||
- dump.first.find(system_allocator_pool_name) == 0);
+ size_t leveldb_dump_count = 0;
+ for (const auto& dump : process_memory_dump->allocator_dumps()) {
+ if (dump.first.find("leveldb/leveldb_proto/") == 0) {
+ leveldb_dump_count++;
+ }
}
+ ASSERT_EQ(1u, leveldb_dump_count);
}
} // namespace leveldb_proto
« no previous file with comments | « components/leveldb_proto/leveldb_database.cc ('k') | components/sync/engine/attachments/on_disk_attachment_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698