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 "components/tracing/child/child_trace_message_filter.h" | 5 #include "components/tracing/child/child_trace_message_filter.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/metrics/histogram_macros.h" |
11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
12 #include "components/tracing/common/tracing_messages.h" | 13 #include "components/tracing/common/tracing_messages.h" |
13 #include "ipc/ipc_message.h" | 14 #include "ipc/ipc_message.h" |
14 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 namespace tracing { | 19 namespace tracing { |
19 | 20 |
20 class FakeSender : public IPC::Sender { | 21 class FakeSender : public IPC::Sender { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 OnSetUMACallback("foo3", 1, 3, false); | 81 OnSetUMACallback("foo3", 1, 3, false); |
81 | 82 |
82 base::RunLoop().RunUntilIdle(); | 83 base::RunLoop().RunUntilIdle(); |
83 | 84 |
84 EXPECT_TRUE(fake_sender_.last_message_); | 85 EXPECT_TRUE(fake_sender_.last_message_); |
85 EXPECT_EQ(fake_sender_.last_message_->type(), | 86 EXPECT_EQ(fake_sender_.last_message_->type(), |
86 TracingHostMsg_AbortBackgroundTrace::ID); | 87 TracingHostMsg_AbortBackgroundTrace::ID); |
87 } | 88 } |
88 | 89 |
89 } // namespace tracing | 90 } // namespace tracing |
OLD | NEW |