OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 DoRequestGlobalDump(callback); | 119 DoRequestGlobalDump(callback); |
120 } | 120 } |
121 run_loop.Run(); | 121 run_loop.Run(); |
122 } | 122 } |
123 | 123 |
124 void Navigate(Shell* shell) { | 124 void Navigate(Shell* shell) { |
125 NavigateToURL(shell, GetTestUrl("", "title.html")); | 125 NavigateToURL(shell, GetTestUrl("", "title.html")); |
126 } | 126 } |
127 | 127 |
128 base::Closure on_memory_dump_complete_closure_; | 128 base::Closure on_memory_dump_complete_closure_; |
129 scoped_ptr<MockDumpProvider> mock_dump_provider_; | 129 std::unique_ptr<MockDumpProvider> mock_dump_provider_; |
130 uint32_t callback_call_count_; | 130 uint32_t callback_call_count_; |
131 uint64_t last_callback_dump_guid_; | 131 uint64_t last_callback_dump_guid_; |
132 bool last_callback_success_; | 132 bool last_callback_success_; |
133 }; | 133 }; |
134 | 134 |
135 // Ignore SingleProcessMemoryTracingTests for Google Chrome builds because | 135 // Ignore SingleProcessMemoryTracingTests for Google Chrome builds because |
136 // single-process is not supported on those builds. | 136 // single-process is not supported on those builds. |
137 #if !defined(GOOGLE_CHROME_BUILD) | 137 #if !defined(GOOGLE_CHROME_BUILD) |
138 | 138 |
139 class SingleProcessMemoryTracingTest : public MemoryTracingTest { | 139 class SingleProcessMemoryTracingTest : public MemoryTracingTest { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 EnableMemoryTracing(); | 224 EnableMemoryTracing(); |
225 RequestGlobalDumpAndWait(false /* from_renderer_thread */); | 225 RequestGlobalDumpAndWait(false /* from_renderer_thread */); |
226 EXPECT_EQ(1u, callback_call_count_); | 226 EXPECT_EQ(1u, callback_call_count_); |
227 EXPECT_NE(0u, last_callback_dump_guid_); | 227 EXPECT_NE(0u, last_callback_dump_guid_); |
228 EXPECT_TRUE(last_callback_success_); | 228 EXPECT_TRUE(last_callback_success_); |
229 DisableTracing(); | 229 DisableTracing(); |
230 } | 230 } |
231 | 231 |
232 } // namespace content | 232 } // namespace content |
OLD | NEW |