| 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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/test/simple_test_tick_clock.h" | 7 #include "base/test/simple_test_tick_clock.h" |
| 8 #include "base/time/tick_clock.h" | 8 #include "base/time/tick_clock.h" |
| 9 #include "media/cast/cast_environment.h" | 9 #include "media/cast/cast_environment.h" |
| 10 #include "media/cast/logging/encoding_event_subscriber.h" | 10 #include "media/cast/logging/encoding_event_subscriber.h" |
| 11 #include "media/cast/logging/logging_defines.h" | 11 #include "media/cast/logging/logging_defines.h" |
| 12 #include "media/cast/test/fake_single_thread_task_runner.h" | 12 #include "media/cast/test/fake_single_thread_task_runner.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 using media::cast::proto::AggregatedFrameEvent; | 15 using media::cast::proto::AggregatedFrameEvent; |
| 16 using media::cast::proto::AggregatedPacketEvent; | 16 using media::cast::proto::AggregatedPacketEvent; |
| 17 using media::cast::proto::BasePacketEvent; | 17 using media::cast::proto::BasePacketEvent; |
| 18 using media::cast::proto::LogMetadata; | 18 using media::cast::proto::LogMetadata; |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 int64 InMilliseconds(base::TimeTicks event_time) { | 22 int64_t InMilliseconds(base::TimeTicks event_time) { |
| 23 return (event_time - base::TimeTicks()).InMilliseconds(); | 23 return (event_time - base::TimeTicks()).InMilliseconds(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace media { | 28 namespace media { |
| 29 namespace cast { | 29 namespace cast { |
| 30 | 30 |
| 31 class EncodingEventSubscriberTest : public ::testing::Test { | 31 class EncodingEventSubscriberTest : public ::testing::Test { |
| 32 protected: | 32 protected: |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 EXPECT_EQ(kMaxEventsPerProto, | 766 EXPECT_EQ(kMaxEventsPerProto, |
| 767 packet_event->base_packet_event(0).event_type_size()); | 767 packet_event->base_packet_event(0).event_type_size()); |
| 768 | 768 |
| 769 ++packet_it; | 769 ++packet_it; |
| 770 packet_event = *packet_it; | 770 packet_event = *packet_it; |
| 771 EXPECT_EQ(1, packet_event->base_packet_event(0).event_type_size()); | 771 EXPECT_EQ(1, packet_event->base_packet_event(0).event_type_size()); |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace cast | 774 } // namespace cast |
| 775 } // namespace media | 775 } // namespace media |
| OLD | NEW |