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

Unified Diff: net/ssl/ssl_client_session_cache_unittest.cc

Issue 2699163002: Whitelist net/ MemoryDumpProvider (Closed)
Patch Set: fix test on windows Created 3 years, 10 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 | « net/spdy/spdy_session_pool_unittest.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_client_session_cache_unittest.cc
diff --git a/net/ssl/ssl_client_session_cache_unittest.cc b/net/ssl/ssl_client_session_cache_unittest.cc
index 5158782d93400aae1d2f666194c407b272ba1843..07ae81bc8df629d14985b5c9009879c5b8004c30 100644
--- a/net/ssl/ssl_client_session_cache_unittest.cc
+++ b/net/ssl/ssl_client_session_cache_unittest.cc
@@ -354,8 +354,19 @@ TEST_F(SSLClientSessionCacheTest, TestFlushOnMemoryNotifications) {
EXPECT_EQ(0u, cache.size());
}
+class SSLClientSessionCacheMemoryDumpTest
+ : public SSLClientSessionCacheTest,
+ public testing::WithParamInterface<
+ base::trace_event::MemoryDumpLevelOfDetail> {};
+
+INSTANTIATE_TEST_CASE_P(
+ /* no prefix */,
+ SSLClientSessionCacheMemoryDumpTest,
+ ::testing::Values(base::trace_event::MemoryDumpLevelOfDetail::DETAILED,
+ base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND));
+
// Basic test for dumping memory stats.
-TEST_F(SSLClientSessionCacheTest, TestDumpMemoryStats) {
+TEST_P(SSLClientSessionCacheMemoryDumpTest, TestDumpMemoryStats) {
SSLClientSessionCache::Config config;
SSLClientSessionCache cache(config);
@@ -372,8 +383,7 @@ TEST_F(SSLClientSessionCacheTest, TestDumpMemoryStats) {
EXPECT_EQ(session3.get(), cache.Lookup("key3", nullptr).get());
EXPECT_EQ(3u, cache.size());
- base::trace_event::MemoryDumpArgs dump_args = {
- base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
+ base::trace_event::MemoryDumpArgs dump_args = {GetParam()};
std::unique_ptr<base::trace_event::ProcessMemoryDump> process_memory_dump(
new base::trace_event::ProcessMemoryDump(nullptr, dump_args));
cache.DumpMemoryStats(process_memory_dump.get());
« no previous file with comments | « net/spdy/spdy_session_pool_unittest.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698