| 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 "media/cast/net/cast_transport_sender_impl.h" | 5 #include "media/cast/net/cast_transport_sender_impl.h" |
| 6 | 6 |
| 7 #include <gtest/gtest.h> | 7 #include <gtest/gtest.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/test/simple_test_tick_clock.h" | 15 #include "base/test/simple_test_tick_clock.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "media/cast/net/cast_transport_config.h" | 17 #include "media/cast/net/cast_transport_config.h" |
| 18 #include "media/cast/net/rtcp/rtcp.h" | 18 #include "media/cast/net/rtcp/rtcp_defines.h" |
| 19 #include "media/cast/test/fake_single_thread_task_runner.h" | 19 #include "media/cast/test/fake_single_thread_task_runner.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 namespace media { | 22 namespace media { |
| 23 namespace cast { | 23 namespace cast { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 const int64_t kStartMillisecond = INT64_C(12345678900000); | 26 const int64_t kStartMillisecond = INT64_C(12345678900000); |
| 27 const uint32_t kVideoSsrc = 1; | 27 const uint32_t kVideoSsrc = 1; |
| 28 const uint32_t kAudioSsrc = 2; | 28 const uint32_t kAudioSsrc = 2; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 task_runner_->RunTasks(); | 382 task_runner_->RunTasks(); |
| 383 EXPECT_EQ(7, transport_.packets_sent()); | 383 EXPECT_EQ(7, transport_.packets_sent()); |
| 384 EXPECT_EQ(1, num_times_logging_callback_called_); // Only 8 ms since last. | 384 EXPECT_EQ(1, num_times_logging_callback_called_); // Only 8 ms since last. |
| 385 | 385 |
| 386 task_runner_->Sleep(base::TimeDelta::FromMilliseconds(2)); | 386 task_runner_->Sleep(base::TimeDelta::FromMilliseconds(2)); |
| 387 EXPECT_EQ(2, num_times_logging_callback_called_); | 387 EXPECT_EQ(2, num_times_logging_callback_called_); |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace cast | 390 } // namespace cast |
| 391 } // namespace media | 391 } // namespace media |
| OLD | NEW |