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 "chrome/browser/task_manager/sampling/shared_sampler.h" | 5 #include "chrome/browser/task_manager/sampling/shared_sampler.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/sequenced_task_runner.h" | 16 #include "base/sequenced_task_runner.h" |
| 17 #include "base/threading/sequenced_worker_pool.h" |
17 #include "base/time/time.h" | 18 #include "base/time/time.h" |
18 #include "chrome/browser/task_manager/sampling/shared_sampler_win_defines.h" | 19 #include "chrome/browser/task_manager/sampling/shared_sampler_win_defines.h" |
19 #include "chrome/browser/task_manager/task_manager_observer.h" | 20 #include "chrome/browser/task_manager/task_manager_observer.h" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
23 | 24 |
24 namespace task_manager { | 25 namespace task_manager { |
25 | 26 |
26 // This test class drives SharedSampler in a way similar to the real | 27 // This test class drives SharedSampler in a way similar to the real |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 EXPECT_EQ(REFRESH_TYPE_IDLE_WAKEUPS | REFRESH_TYPE_PHYSICAL_MEMORY | | 249 EXPECT_EQ(REFRESH_TYPE_IDLE_WAKEUPS | REFRESH_TYPE_PHYSICAL_MEMORY | |
249 REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME, | 250 REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME, |
250 finished_refresh_type()); | 251 finished_refresh_type()); |
251 | 252 |
252 EXPECT_EQ(1024ll, physical_bytes()); | 253 EXPECT_EQ(1024ll, physical_bytes()); |
253 | 254 |
254 SharedSampler::SetQuerySystemInformationForTest(nullptr); | 255 SharedSampler::SetQuerySystemInformationForTest(nullptr); |
255 } | 256 } |
256 | 257 |
257 } // namespace task_manager | 258 } // namespace task_manager |
OLD | NEW |