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 "content/renderer/media/webrtc/media_stream_remote_video_source.h" | 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
13 #include "content/child/child_process.h" | 13 #include "content/child/child_process.h" |
14 #include "content/renderer/media/media_stream_video_track.h" | 14 #include "content/renderer/media/media_stream_video_track.h" |
15 #include "content/renderer/media/mock_media_stream_video_sink.h" | 15 #include "content/renderer/media/mock_media_stream_video_sink.h" |
16 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" | 16 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory.
h" |
17 #include "content/renderer/media/webrtc/track_observer.h" | 17 #include "content/renderer/media/webrtc/track_observer.h" |
18 #include "media/base/video_frame.h" | 18 #include "media/base/video_frame.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/WebKit/public/web/WebHeap.h" | 20 #include "third_party/WebKit/public/web/WebHeap.h" |
21 #include "third_party/libjingle/source/talk/media/webrtc/webrtcvideoframe.h" | 21 #include "third_party/webrtc/media/webrtc/webrtcvideoframe.h" |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 ACTION_P(RunClosure, closure) { | 25 ACTION_P(RunClosure, closure) { |
26 closure.Run(); | 26 closure.Run(); |
27 } | 27 } |
28 | 28 |
29 class MediaStreamRemoteVideoSourceUnderTest | 29 class MediaStreamRemoteVideoSourceUnderTest |
30 : public MediaStreamRemoteVideoSource { | 30 : public MediaStreamRemoteVideoSource { |
31 public: | 31 public: |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 StopWebRtcTrack(); | 149 StopWebRtcTrack(); |
150 base::RunLoop().RunUntilIdle(); | 150 base::RunLoop().RunUntilIdle(); |
151 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, | 151 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, |
152 webkit_source().readyState()); | 152 webkit_source().readyState()); |
153 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink.state()); | 153 EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, sink.state()); |
154 | 154 |
155 track->RemoveSink(&sink); | 155 track->RemoveSink(&sink); |
156 } | 156 } |
157 | 157 |
158 } // namespace content | 158 } // namespace content |
OLD | NEW |