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 #include <vector> | 6 #include <vector> |
7 | 7 |
| 8 #include "base/bind.h" |
8 #include "base/test/simple_test_tick_clock.h" | 9 #include "base/test/simple_test_tick_clock.h" |
9 #include "media/cast/cast_defines.h" | 10 #include "media/cast/cast_defines.h" |
10 #include "media/cast/net/cast_transport_config.h" | 11 #include "media/cast/net/cast_transport_config.h" |
11 #include "media/cast/net/pacing/paced_sender.h" | 12 #include "media/cast/net/pacing/paced_sender.h" |
12 #include "media/cast/net/rtcp/rtcp.h" | 13 #include "media/cast/net/rtcp/rtcp.h" |
13 #include "media/cast/test/skewed_tick_clock.h" | 14 #include "media/cast/test/skewed_tick_clock.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 | 16 |
16 namespace media { | 17 namespace media { |
17 namespace cast { | 18 namespace cast { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 base::TimeTicks out_3 = ConvertNtpToTimeTicks(ntp_seconds_3, ntp_fraction_3); | 307 base::TimeTicks out_3 = ConvertNtpToTimeTicks(ntp_seconds_3, ntp_fraction_3); |
307 EXPECT_EQ(input_time, out_3); // Verify inverse. | 308 EXPECT_EQ(input_time, out_3); // Verify inverse. |
308 | 309 |
309 // Verify delta. | 310 // Verify delta. |
310 EXPECT_EQ((out_3 - out_2), time_delta); | 311 EXPECT_EQ((out_3 - out_2), time_delta); |
311 EXPECT_NEAR((ntp_fraction_3 - ntp_fraction_2), 0xffffffff / 2, 1); | 312 EXPECT_NEAR((ntp_fraction_3 - ntp_fraction_2), 0xffffffff / 2, 1); |
312 } | 313 } |
313 | 314 |
314 } // namespace cast | 315 } // namespace cast |
315 } // namespace media | 316 } // namespace media |
OLD | NEW |