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

Side by Side Diff: media/capture/video/fake_video_capture_device_unittest.cc

Issue 2270563006: ImageCapture: support exposure mode configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reillyg@ comments Created 4 years, 4 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 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 "media/capture/video/fake_video_capture_device.h" 5 #include "media/capture/video/fake_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 EXPECT_EQ(240u, capabilities->height->min); 328 EXPECT_EQ(240u, capabilities->height->min);
329 EXPECT_EQ(1080u, capabilities->height->max); 329 EXPECT_EQ(1080u, capabilities->height->max);
330 EXPECT_EQ(capture_params.requested_format.frame_size.width(), 330 EXPECT_EQ(capture_params.requested_format.frame_size.width(),
331 static_cast<int>(capabilities->width->current)); 331 static_cast<int>(capabilities->width->current));
332 EXPECT_EQ(320u, capabilities->width->min); 332 EXPECT_EQ(320u, capabilities->width->min);
333 EXPECT_EQ(1920u, capabilities->width->max); 333 EXPECT_EQ(1920u, capabilities->width->max);
334 EXPECT_EQ(100u, capabilities->zoom->min); 334 EXPECT_EQ(100u, capabilities->zoom->min);
335 EXPECT_EQ(400u, capabilities->zoom->max); 335 EXPECT_EQ(400u, capabilities->zoom->max);
336 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min); 336 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min);
337 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current); 337 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current);
338 EXPECT_EQ(mojom::FocusMode::UNAVAILABLE, capabilities->focus_mode); 338 EXPECT_EQ(mojom::MeteringMode::UNAVAILABLE, capabilities->focus_mode);
339 EXPECT_EQ(mojom::MeteringMode::UNAVAILABLE, capabilities->exposure_mode);
339 340
340 // Set options: zoom to the maximum value. 341 // Set options: zoom to the maximum value.
341 const unsigned int max_zoom_value = capabilities->zoom->max; 342 const unsigned int max_zoom_value = capabilities->zoom->max;
342 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( 343 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback(
343 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, 344 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions,
344 image_capture_client_), 345 image_capture_client_),
345 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, 346 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure,
346 image_capture_client_)); 347 image_capture_client_));
347 348
348 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); 349 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 422 }
422 } 423 }
423 424
424 INSTANTIATE_TEST_CASE_P(, 425 INSTANTIATE_TEST_CASE_P(,
425 FakeVideoCaptureDeviceCommandLineTest, 426 FakeVideoCaptureDeviceCommandLineTest,
426 Values(CommandLineTestData{"fps=-1", 5}, 427 Values(CommandLineTestData{"fps=-1", 5},
427 CommandLineTestData{"fps=29.97", 29.97f}, 428 CommandLineTestData{"fps=29.97", 29.97f},
428 CommandLineTestData{"fps=60", 60}, 429 CommandLineTestData{"fps=60", 60},
429 CommandLineTestData{"fps=1000", 60})); 430 CommandLineTestData{"fps=1000", 60}));
430 }; // namespace media 431 }; // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/fake_video_capture_device.cc ('k') | media/mojo/interfaces/image_capture.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698