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

Unified Diff: net/url_request/url_request_context_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/url_request/url_request_context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_unittest.cc
diff --git a/net/url_request/url_request_context_unittest.cc b/net/url_request/url_request_context_unittest.cc
index bae16853a7d57e050b038580793cd88c79054dc9..147e350b9ca4656efc58d51853ef5baccf831bf7 100644
--- a/net/url_request/url_request_context_unittest.cc
+++ b/net/url_request/url_request_context_unittest.cc
@@ -7,6 +7,7 @@
#include <memory>
#include "base/memory/ptr_util.h"
+#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/process_memory_dump.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/url_request/url_request_context_builder.h"
@@ -14,10 +15,19 @@
namespace net {
+class URLRequestContextMemoryDumpTest
+ : public testing::TestWithParam<
+ base::trace_event::MemoryDumpLevelOfDetail> {};
+
+INSTANTIATE_TEST_CASE_P(
+ /* no prefix */,
+ URLRequestContextMemoryDumpTest,
+ ::testing::Values(base::trace_event::MemoryDumpLevelOfDetail::DETAILED,
+ base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND));
+
// Checks if the dump provider runs without crashing and dumps root objects.
-TEST(URLRequestContextTest, MemoryDumpProvider) {
- base::trace_event::MemoryDumpArgs dump_args = {
- base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
+TEST_P(URLRequestContextMemoryDumpTest, MemoryDumpProvider) {
+ 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));
URLRequestContextBuilder builder;
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698