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

Unified Diff: net/spdy/spdy_session_pool_unittest.cc

Issue 2699163002: Whitelist net/ MemoryDumpProvider (Closed)
Patch Set: 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
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..a8db090e9ba0f6101a2cecd7f87f020ae53aa8dd 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,8 +703,7 @@ 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 =

Powered by Google App Engine
This is Rietveld 408576698