| 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 <stdint.h> |
| 6 |
| 5 #include "base/bind.h" | 7 #include "base/bind.h" |
| 6 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 7 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| 9 #include "media/cast/cast_defines.h" | 11 #include "media/cast/cast_defines.h" |
| 10 #include "media/cast/cast_environment.h" | 12 #include "media/cast/cast_environment.h" |
| 11 #include "media/cast/logging/simple_event_subscriber.h" | 13 #include "media/cast/logging/simple_event_subscriber.h" |
| 12 #include "media/cast/test/fake_single_thread_task_runner.h" | 14 #include "media/cast/test/fake_single_thread_task_runner.h" |
| 13 #include "media/cast/transport/pacing/mock_paced_packet_sender.h" | 15 #include "media/cast/transport/pacing/mock_paced_packet_sender.h" |
| 14 #include "media/cast/video_receiver/video_receiver.h" | 16 #include "media/cast/video_receiver/video_receiver.h" |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| 16 | 18 |
| 17 static const int kPacketSize = 1500; | 19 static const int kPacketSize = 1500; |
| 18 static const int64 kStartMillisecond = GG_INT64_C(12345678900000); | 20 static const int64 kStartMillisecond = INT64_C(12345678900000); |
| 19 | 21 |
| 20 namespace media { | 22 namespace media { |
| 21 namespace cast { | 23 namespace cast { |
| 22 | 24 |
| 23 using testing::_; | 25 using testing::_; |
| 24 | 26 |
| 25 namespace { | 27 namespace { |
| 26 // Was thread counted thread safe. | 28 // Was thread counted thread safe. |
| 27 class TestVideoReceiverCallback | 29 class TestVideoReceiverCallback |
| 28 : public base::RefCountedThreadSafe<TestVideoReceiverCallback> { | 30 : public base::RefCountedThreadSafe<TestVideoReceiverCallback> { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 &TestVideoReceiverCallback::DecodeComplete, video_receiver_callback_); | 166 &TestVideoReceiverCallback::DecodeComplete, video_receiver_callback_); |
| 165 receiver_->GetRawVideoFrame(frame_decoded_callback); | 167 receiver_->GetRawVideoFrame(frame_decoded_callback); |
| 166 task_runner_->RunTasks(); | 168 task_runner_->RunTasks(); |
| 167 EXPECT_EQ(video_receiver_callback_->number_times_called(), 0); | 169 EXPECT_EQ(video_receiver_callback_->number_times_called(), 0); |
| 168 } | 170 } |
| 169 | 171 |
| 170 // TODO(pwestin): add encoded frames. | 172 // TODO(pwestin): add encoded frames. |
| 171 | 173 |
| 172 } // namespace cast | 174 } // namespace cast |
| 173 } // namespace media | 175 } // namespace media |
| OLD | NEW |