| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/test/simple_test_tick_clock.h" | 8 #include "base/test/simple_test_tick_clock.h" |
| 9 #include "media/cast/cast_defines.h" | 9 #include "media/cast/cast_defines.h" |
| 10 #include "media/cast/cast_environment.h" | 10 #include "media/cast/cast_environment.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 | 67 |
| 68 class VideoReceiverTest : public ::testing::Test { | 68 class VideoReceiverTest : public ::testing::Test { |
| 69 protected: | 69 protected: |
| 70 VideoReceiverTest() { | 70 VideoReceiverTest() { |
| 71 // Configure to use vp8 software implementation. | 71 // Configure to use vp8 software implementation. |
| 72 config_.codec = kVp8; | 72 config_.codec = kVp8; |
| 73 config_.use_external_decoder = false; | 73 config_.use_external_decoder = false; |
| 74 task_runner_ = new test::FakeTaskRunner(&testing_clock_); | 74 task_runner_ = new test::FakeTaskRunner(&testing_clock_); |
| 75 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, | 75 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, |
| 76 task_runner_, task_runner_, task_runner_, task_runner_); | 76 task_runner_, task_runner_, task_runner_, task_runner_, |
| 77 false, false, false); |
| 77 receiver_.reset(new | 78 receiver_.reset(new |
| 78 PeerVideoReceiver(cast_environment_, config_, &mock_transport_)); | 79 PeerVideoReceiver(cast_environment_, config_, &mock_transport_)); |
| 79 testing_clock_.Advance( | 80 testing_clock_.Advance( |
| 80 base::TimeDelta::FromMilliseconds(kStartMillisecond)); | 81 base::TimeDelta::FromMilliseconds(kStartMillisecond)); |
| 81 video_receiver_callback_ = new TestVideoReceiverCallback(); | 82 video_receiver_callback_ = new TestVideoReceiverCallback(); |
| 82 } | 83 } |
| 83 | 84 |
| 84 virtual ~VideoReceiverTest() {} | 85 virtual ~VideoReceiverTest() {} |
| 85 | 86 |
| 86 virtual void SetUp() { | 87 virtual void SetUp() { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 task_runner_->RunTasks(); | 155 task_runner_->RunTasks(); |
| 155 EXPECT_EQ(video_receiver_callback_->number_times_called(), 0); | 156 EXPECT_EQ(video_receiver_callback_->number_times_called(), 0); |
| 156 } | 157 } |
| 157 | 158 |
| 158 // TODO(pwestin): add encoded frames. | 159 // TODO(pwestin): add encoded frames. |
| 159 | 160 |
| 160 } // namespace cast | 161 } // namespace cast |
| 161 } // namespace media | 162 } // namespace media |
| 162 | 163 |
| 163 | 164 |
| OLD | NEW |