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

Unified Diff: net/spdy/spdy_session_pool_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/http/http_network_session.cc ('k') | net/ssl/ssl_client_session_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool_unittest.cc
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc
index 51362da98a751a01709ac8295ec087467eb3febd..e78409460f59a676661b35ff1f6ece1c89b31a8a 100644
--- a/net/spdy/spdy_session_pool_unittest.cc
+++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -671,7 +671,18 @@ TEST_F(SpdySessionPoolTest, FindAvailableSession) {
spdy_session_pool_->CloseCurrentSessions(ERR_ABORTED);
}
-TEST_F(SpdySessionPoolTest, DumpMemoryStats) {
+class SpdySessionMemoryDumpTest
+ : public SpdySessionPoolTest,
+ public testing::WithParamInterface<
+ base::trace_event::MemoryDumpLevelOfDetail> {};
+
+INSTANTIATE_TEST_CASE_P(
+ /* no prefix */,
+ SpdySessionMemoryDumpTest,
+ ::testing::Values(base::trace_event::MemoryDumpLevelOfDetail::DETAILED,
+ base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND));
+
+TEST_P(SpdySessionMemoryDumpTest, DumpMemoryStats) {
SpdySessionKey key(HostPortPair("https://www.example.org", 443),
ProxyServer::Direct(), PRIVACY_MODE_DISABLED);
@@ -692,12 +703,12 @@ TEST_F(SpdySessionPoolTest, DumpMemoryStats) {
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(HasSpdySession(spdy_session_pool_, key));
- 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));
base::trace_event::MemoryAllocatorDump* parent_dump =
- process_memory_dump->CreateAllocatorDump("parent");
+ process_memory_dump->CreateAllocatorDump(
+ "net/http_network_session_0x123");
spdy_session_pool_->DumpMemoryStats(process_memory_dump.get(),
parent_dump->absolute_name());
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/ssl/ssl_client_session_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698