OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/url_request/url_request_context.h" | 5 #include "net/url_request/url_request_context.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
| 9 #include "base/memory/ptr_util.h" |
9 #include "base/trace_event/process_memory_dump.h" | 10 #include "base/trace_event/process_memory_dump.h" |
10 #include "net/proxy/proxy_config_service_fixed.h" | 11 #include "net/proxy/proxy_config_service_fixed.h" |
11 #include "net/url_request/url_request_context_builder.h" | 12 #include "net/url_request/url_request_context_builder.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace net { | 15 namespace net { |
15 | 16 |
16 // Checks if the dump provider runs without crashing and dumps root objects. | 17 // Checks if the dump provider runs without crashing and dumps root objects. |
17 TEST(URLRequestContextTest, MemoryDumpProvider) { | 18 TEST(URLRequestContextTest, MemoryDumpProvider) { |
18 base::trace_event::MemoryDumpArgs dump_args = { | 19 base::trace_event::MemoryDumpArgs dump_args = { |
(...skipping 22 matching lines...) Expand all Loading... |
41 if (dump_name.find("net/url_request_context") != std::string::npos) | 42 if (dump_name.find("net/url_request_context") != std::string::npos) |
42 did_dump_url_request_context = true; | 43 did_dump_url_request_context = true; |
43 } | 44 } |
44 ASSERT_TRUE(did_dump_http_network_session); | 45 ASSERT_TRUE(did_dump_http_network_session); |
45 ASSERT_TRUE(did_dump_ssl_client_session_cache); | 46 ASSERT_TRUE(did_dump_ssl_client_session_cache); |
46 ASSERT_TRUE(did_dump_url_request_context); | 47 ASSERT_TRUE(did_dump_url_request_context); |
47 } | 48 } |
48 | 49 |
49 // TODO(xunjieli): Add more granular tests on the MemoryDumpProvider. | 50 // TODO(xunjieli): Add more granular tests on the MemoryDumpProvider. |
50 } // namespace net | 51 } // namespace net |
OLD | NEW |