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

Unified Diff: net/base/sdch_manager_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
« no previous file with comments | « no previous file | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager_unittest.cc
diff --git a/net/base/sdch_manager_unittest.cc b/net/base/sdch_manager_unittest.cc
index 31162841b6c90495ed201818d9e1b042beee2e1a..b4bdb2a57c65a960252e64f14b47f378d718a248 100644
--- a/net/base/sdch_manager_unittest.cc
+++ b/net/base/sdch_manager_unittest.cc
@@ -640,7 +640,18 @@ TEST_F(SdchManagerTest, AddRemoveNotifications) {
sdch_manager()->RemoveObserver(&observer);
}
-TEST_F(SdchManagerTest, DumpMemoryStats) {
+class SdchManagerMemoryDumpTest
+ : public SdchManagerTest,
+ public testing::WithParamInterface<
+ base::trace_event::MemoryDumpLevelOfDetail> {};
+
+INSTANTIATE_TEST_CASE_P(
+ /* no prefix */,
+ SdchManagerMemoryDumpTest,
+ ::testing::Values(base::trace_event::MemoryDumpLevelOfDetail::DETAILED,
+ base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND));
+
+TEST_P(SdchManagerMemoryDumpTest, DumpMemoryStats) {
MockSdchObserver observer;
sdch_manager()->AddObserver(&observer);
@@ -655,8 +666,7 @@ TEST_F(SdchManagerTest, DumpMemoryStats) {
EXPECT_EQ(target_gurl, observer.last_dictionary_url());
EXPECT_EQ(server_hash, observer.last_server_hash());
- base::trace_event::MemoryDumpArgs dump_args = {
- base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
+ base::trace_event::MemoryDumpArgs dump_args = {GetParam()};
xunjieli 2017/02/17 16:50:11 sid: Do I need to set "ProcessMemoryDump::is_black
ssid 2017/02/21 18:07:43 No. This shouldn't be set.
xunjieli 2017/02/23 19:00:22 Done.
std::unique_ptr<base::trace_event::ProcessMemoryDump> pmd(
new base::trace_event::ProcessMemoryDump(nullptr, dump_args));
« no previous file with comments | « no previous file | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698