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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/process_util.h" | 10 #include "base/process/process_handle.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 const int kLineNumber = 1776; | 14 const int kLineNumber = 1776; |
15 const char kFile[] = "FixedUnitTestFileName"; | 15 const char kFile[] = "FixedUnitTestFileName"; |
16 const char kWorkerThreadName[] = "WorkerThread-1"; | 16 const char kWorkerThreadName[] = "WorkerThread-1"; |
17 const char kMainThreadName[] = "SomeMainThreadName"; | 17 const char kMainThreadName[] = "SomeMainThreadName"; |
18 const char kStillAlive[] = "Still_Alive"; | 18 const char kStillAlive[] = "Still_Alive"; |
19 | 19 |
20 namespace tracked_objects { | 20 namespace tracked_objects { |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 EXPECT_EQ(0, process_data.tasks[1].death_data.run_duration_sample); | 572 EXPECT_EQ(0, process_data.tasks[1].death_data.run_duration_sample); |
573 EXPECT_EQ(0, process_data.tasks[1].death_data.queue_duration_sum); | 573 EXPECT_EQ(0, process_data.tasks[1].death_data.queue_duration_sum); |
574 EXPECT_EQ(0, process_data.tasks[1].death_data.queue_duration_max); | 574 EXPECT_EQ(0, process_data.tasks[1].death_data.queue_duration_max); |
575 EXPECT_EQ(0, process_data.tasks[1].death_data.queue_duration_sample); | 575 EXPECT_EQ(0, process_data.tasks[1].death_data.queue_duration_sample); |
576 EXPECT_EQ(kStillAlive, process_data.tasks[1].death_thread_name); | 576 EXPECT_EQ(kStillAlive, process_data.tasks[1].death_thread_name); |
577 EXPECT_EQ(0u, process_data.descendants.size()); | 577 EXPECT_EQ(0u, process_data.descendants.size()); |
578 EXPECT_EQ(base::GetCurrentProcId(), process_data.process_id); | 578 EXPECT_EQ(base::GetCurrentProcId(), process_data.process_id); |
579 } | 579 } |
580 | 580 |
581 } // namespace tracked_objects | 581 } // namespace tracked_objects |
OLD | NEW |