OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 static const int64 kStartMillisecond = INT64_C(12345678900000); | 26 static const int64 kStartMillisecond = INT64_C(12345678900000); |
27 | 27 |
28 class LoggingImplTest : public ::testing::Test { | 28 class LoggingImplTest : public ::testing::Test { |
29 protected: | 29 protected: |
30 LoggingImplTest() { | 30 LoggingImplTest() { |
31 testing_clock_.Advance( | 31 testing_clock_.Advance( |
32 base::TimeDelta::FromMilliseconds(kStartMillisecond)); | 32 base::TimeDelta::FromMilliseconds(kStartMillisecond)); |
33 logging_.AddRawEventSubscriber(&event_subscriber_); | 33 logging_.AddRawEventSubscriber(&event_subscriber_); |
34 } | 34 } |
35 | 35 |
36 virtual ~LoggingImplTest() { | 36 ~LoggingImplTest() override { |
37 logging_.RemoveRawEventSubscriber(&event_subscriber_); | 37 logging_.RemoveRawEventSubscriber(&event_subscriber_); |
38 } | 38 } |
39 | 39 |
40 LoggingImpl logging_; | 40 LoggingImpl logging_; |
41 base::SimpleTestTickClock testing_clock_; | 41 base::SimpleTestTickClock testing_clock_; |
42 SimpleEventSubscriber event_subscriber_; | 42 SimpleEventSubscriber event_subscriber_; |
43 | 43 |
44 DISALLOW_COPY_AND_ASSIGN(LoggingImplTest); | 44 DISALLOW_COPY_AND_ASSIGN(LoggingImplTest); |
45 }; | 45 }; |
46 | 46 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 EXPECT_EQ(1u, frame_events.size()); | 225 EXPECT_EQ(1u, frame_events.size()); |
226 frame_events.clear(); | 226 frame_events.clear(); |
227 event_subscriber_2.GetFrameEventsAndReset(&frame_events); | 227 event_subscriber_2.GetFrameEventsAndReset(&frame_events); |
228 EXPECT_EQ(1u, frame_events.size()); | 228 EXPECT_EQ(1u, frame_events.size()); |
229 | 229 |
230 logging_.RemoveRawEventSubscriber(&event_subscriber_2); | 230 logging_.RemoveRawEventSubscriber(&event_subscriber_2); |
231 } | 231 } |
232 | 232 |
233 } // namespace cast | 233 } // namespace cast |
234 } // namespace media | 234 } // namespace media |
OLD | NEW |