Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: content/renderer/media/media_stream_video_renderer_sink_unittest.cc

Issue 2005053006: Cleanup naming issue with content::VideoFrameProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/macros.h" 6 #include "base/macros.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/child/child_process.h" 9 #include "content/child/child_process.h"
10 #include "content/renderer/media/media_stream_video_renderer_sink.h" 10 #include "content/renderer/media/media_stream_video_renderer_sink.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Checks that the initialization-destruction sequence works fine. 101 // Checks that the initialization-destruction sequence works fine.
102 TEST_F(MediaStreamVideoRendererSinkTest, StartStop) { 102 TEST_F(MediaStreamVideoRendererSinkTest, StartStop) {
103 EXPECT_TRUE(IsInStoppedState()); 103 EXPECT_TRUE(IsInStoppedState());
104 104
105 media_stream_video_renderer_sink_->Start(); 105 media_stream_video_renderer_sink_->Start();
106 EXPECT_TRUE(IsInStartedState()); 106 EXPECT_TRUE(IsInStartedState());
107 107
108 media_stream_video_renderer_sink_->Pause(); 108 media_stream_video_renderer_sink_->Pause();
109 EXPECT_TRUE(IsInPausedState()); 109 EXPECT_TRUE(IsInPausedState());
110 110
111 media_stream_video_renderer_sink_->Play(); // Should be called Resume(). 111 media_stream_video_renderer_sink_->Resume();
112 EXPECT_TRUE(IsInStartedState()); 112 EXPECT_TRUE(IsInStartedState());
113 113
114 media_stream_video_renderer_sink_->Stop(); 114 media_stream_video_renderer_sink_->Stop();
115 EXPECT_TRUE(IsInStoppedState()); 115 EXPECT_TRUE(IsInStoppedState());
116 } 116 }
117 117
118 // Sends 2 frames and expect them as WebM contained encoded data in writeData(). 118 // Sends 2 frames and expect them as WebM contained encoded data in writeData().
119 TEST_F(MediaStreamVideoRendererSinkTest, EncodeVideoFrames) { 119 TEST_F(MediaStreamVideoRendererSinkTest, EncodeVideoFrames) {
120 media_stream_video_renderer_sink_->Start(); 120 media_stream_video_renderer_sink_->Start();
121 121
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 const scoped_refptr<media::VideoFrame> video_frame = 189 const scoped_refptr<media::VideoFrame> video_frame =
190 media::VideoFrame::CreateFrame(media::PIXEL_FORMAT_YV12A, kSize, 190 media::VideoFrame::CreateFrame(media::PIXEL_FORMAT_YV12A, kSize,
191 gfx::Rect(kSize), kSize, kTimestamp); 191 gfx::Rect(kSize), kSize, kTimestamp);
192 OnVideoFrame(video_frame); 192 OnVideoFrame(video_frame);
193 message_loop_.RunUntilIdle(); 193 message_loop_.RunUntilIdle();
194 194
195 media_stream_video_renderer_sink_->Stop(); 195 media_stream_video_renderer_sink_->Stop();
196 } 196 }
197 197
198 } // namespace content 198 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_renderer_sink.cc ('k') | content/renderer/media/webmediaplayer_ms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698