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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
| 6 #include <stdint.h> |
6 | 7 |
7 #include "base/bind.h" | 8 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
12 #include "base/test/simple_test_tick_clock.h" | 13 #include "base/test/simple_test_tick_clock.h" |
13 #include "media/cast/cast_config.h" | 14 #include "media/cast/cast_config.h" |
14 #include "media/cast/rtcp/rtcp.h" | 15 #include "media/cast/rtcp/rtcp.h" |
15 #include "media/cast/test/fake_single_thread_task_runner.h" | 16 #include "media/cast/test/fake_single_thread_task_runner.h" |
16 #include "media/cast/transport/cast_transport_config.h" | 17 #include "media/cast/transport/cast_transport_config.h" |
17 #include "media/cast/transport/cast_transport_sender_impl.h" | 18 #include "media/cast/transport/cast_transport_sender_impl.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 | 20 |
20 namespace media { | 21 namespace media { |
21 namespace cast { | 22 namespace cast { |
22 namespace transport { | 23 namespace transport { |
23 | 24 |
24 static const int64 kStartMillisecond = GG_INT64_C(12345678900000); | 25 static const int64 kStartMillisecond = INT64_C(12345678900000); |
25 | 26 |
26 class FakePacketSender : public transport::PacketSender { | 27 class FakePacketSender : public transport::PacketSender { |
27 public: | 28 public: |
28 FakePacketSender() {} | 29 FakePacketSender() {} |
29 | 30 |
30 virtual bool SendPacket(const Packet& packet) OVERRIDE { return true; } | 31 virtual bool SendPacket(const Packet& packet) OVERRIDE { return true; } |
31 }; | 32 }; |
32 | 33 |
33 class CastTransportSenderImplTest : public ::testing::Test { | 34 class CastTransportSenderImplTest : public ::testing::Test { |
34 protected: | 35 protected: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 message_loop_.PostDelayedTask(FROM_HERE, | 102 message_loop_.PostDelayedTask(FROM_HERE, |
102 run_loop_.QuitClosure(), | 103 run_loop_.QuitClosure(), |
103 base::TimeDelta::FromMilliseconds(50)); | 104 base::TimeDelta::FromMilliseconds(50)); |
104 run_loop_.Run(); | 105 run_loop_.Run(); |
105 EXPECT_GT(num_times_callback_called_, 1); | 106 EXPECT_GT(num_times_callback_called_, 1); |
106 } | 107 } |
107 | 108 |
108 } // namespace transport | 109 } // namespace transport |
109 } // namespace cast | 110 } // namespace cast |
110 } // namespace media | 111 } // namespace media |
OLD | NEW |