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