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/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/test/simple_test_tick_clock.h" | 12 #include "base/test/simple_test_tick_clock.h" |
12 #include "base/values.h" | 13 #include "base/values.h" |
13 #include "media/cast/net/cast_transport_config.h" | 14 #include "media/cast/net/cast_transport_config.h" |
14 #include "media/cast/net/cast_transport_sender_impl.h" | 15 #include "media/cast/net/cast_transport_sender_impl.h" |
15 #include "media/cast/net/rtcp/rtcp.h" | 16 #include "media/cast/net/rtcp/rtcp.h" |
16 #include "media/cast/test/fake_single_thread_task_runner.h" | 17 #include "media/cast/test/fake_single_thread_task_runner.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 | 19 |
19 namespace media { | 20 namespace media { |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 task_runner_->RunTasks(); | 387 task_runner_->RunTasks(); |
387 EXPECT_EQ(7, transport_.packets_sent()); | 388 EXPECT_EQ(7, transport_.packets_sent()); |
388 EXPECT_EQ(1, num_times_logging_callback_called_); // Only 8 ms since last. | 389 EXPECT_EQ(1, num_times_logging_callback_called_); // Only 8 ms since last. |
389 | 390 |
390 task_runner_->Sleep(base::TimeDelta::FromMilliseconds(2)); | 391 task_runner_->Sleep(base::TimeDelta::FromMilliseconds(2)); |
391 EXPECT_EQ(2, num_times_logging_callback_called_); | 392 EXPECT_EQ(2, num_times_logging_callback_called_); |
392 } | 393 } |
393 | 394 |
394 } // namespace cast | 395 } // namespace cast |
395 } // namespace media | 396 } // namespace media |
OLD | NEW |