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/browser/renderer_host/media/video_capture_host_unittest.cc

Issue 22876027: Consolidate duplicated frame / capability structures in video_capture_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // 4. First filled buffer will arrive. 243 // 4. First filled buffer will arrive.
244 base::RunLoop run_loop; 244 base::RunLoop run_loop;
245 EXPECT_CALL(*host_.get(), OnBufferFilled(kDeviceId, _, _)) 245 EXPECT_CALL(*host_.get(), OnBufferFilled(kDeviceId, _, _))
246 .Times(AnyNumber()).WillOnce(ExitMessageLoop( 246 .Times(AnyNumber()).WillOnce(ExitMessageLoop(
247 message_loop_, run_loop.QuitClosure())); 247 message_loop_, run_loop.QuitClosure()));
248 248
249 media::VideoCaptureParams params; 249 media::VideoCaptureParams params;
250 params.width = 352; 250 params.width = 352;
251 params.height = 288; 251 params.height = 288;
252 params.frame_per_second = 30; 252 params.frame_rate = 30;
253 params.session_id = kTestFakeDeviceId; 253 params.session_id = kTestFakeDeviceId;
254 host_->OnStartCapture(kDeviceId, params); 254 host_->OnStartCapture(kDeviceId, params);
255 run_loop.Run(); 255 run_loop.Run();
256 } 256 }
257 257
258 #ifdef DUMP_VIDEO 258 #ifdef DUMP_VIDEO
259 void CaptureAndDumpVideo(int width, int heigt, int frame_rate) { 259 void CaptureAndDumpVideo(int width, int heigt, int frame_rate) {
260 InSequence s; 260 InSequence s;
261 // 1. First - get info about the new resolution 261 // 1. First - get info about the new resolution
262 EXPECT_CALL(*host_, OnDeviceInfo(kDeviceId)); 262 EXPECT_CALL(*host_, OnDeviceInfo(kDeviceId));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 #ifdef DUMP_VIDEO 362 #ifdef DUMP_VIDEO
363 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { 363 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) {
364 CaptureAndDumpVideo(640, 480, 30); 364 CaptureAndDumpVideo(640, 480, 30);
365 } 365 }
366 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { 366 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) {
367 CaptureAndDumpVideo(1280, 720, 30); 367 CaptureAndDumpVideo(1280, 720, 30);
368 } 368 }
369 #endif 369 #endif
370 370
371 } // namespace content 371 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698