OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Test of classes in the tracked_objects.h classes. | 5 // Test of classes in the tracked_objects.h classes. |
6 | 6 |
7 #include "base/tracked_objects.h" | 7 #include "base/tracked_objects.h" |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/process/process_handle.h" | 12 #include "base/process/process_handle.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "base/tracking_info.h" | 14 #include "base/tracking_info.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/googletest/include/gtest/gtest.h" |
16 | 16 |
17 const int kLineNumber = 1776; | 17 const int kLineNumber = 1776; |
18 const char kFile[] = "FixedUnitTestFileName"; | 18 const char kFile[] = "FixedUnitTestFileName"; |
19 const char kWorkerThreadName[] = "WorkerThread-1"; | 19 const char kWorkerThreadName[] = "WorkerThread-1"; |
20 const char kMainThreadName[] = "SomeMainThreadName"; | 20 const char kMainThreadName[] = "SomeMainThreadName"; |
21 const char kStillAlive[] = "Still_Alive"; | 21 const char kStillAlive[] = "Still_Alive"; |
22 | 22 |
23 namespace tracked_objects { | 23 namespace tracked_objects { |
24 | 24 |
25 class TrackedObjectsTest : public testing::Test { | 25 class TrackedObjectsTest : public testing::Test { |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 EXPECT_EQ(2, process_data_phase.tasks[t1].death_data.run_duration_max); | 1177 EXPECT_EQ(2, process_data_phase.tasks[t1].death_data.run_duration_max); |
1178 EXPECT_EQ(2, process_data_phase.tasks[t1].death_data.run_duration_sample); | 1178 EXPECT_EQ(2, process_data_phase.tasks[t1].death_data.run_duration_sample); |
1179 EXPECT_EQ(1, process_data_phase.tasks[t1].death_data.queue_duration_sum); | 1179 EXPECT_EQ(1, process_data_phase.tasks[t1].death_data.queue_duration_sum); |
1180 EXPECT_EQ(1, process_data_phase.tasks[t1].death_data.queue_duration_max); | 1180 EXPECT_EQ(1, process_data_phase.tasks[t1].death_data.queue_duration_max); |
1181 EXPECT_EQ(1, process_data_phase.tasks[t1].death_data.queue_duration_sample); | 1181 EXPECT_EQ(1, process_data_phase.tasks[t1].death_data.queue_duration_sample); |
1182 EXPECT_EQ(kMainThreadName, process_data_phase.tasks[t1].death_thread_name); | 1182 EXPECT_EQ(kMainThreadName, process_data_phase.tasks[t1].death_thread_name); |
1183 EXPECT_EQ(base::GetCurrentProcId(), process_data.process_id); | 1183 EXPECT_EQ(base::GetCurrentProcId(), process_data.process_id); |
1184 } | 1184 } |
1185 | 1185 |
1186 } // namespace tracked_objects | 1186 } // namespace tracked_objects |
OLD | NEW |