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 "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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 EXPECT_EQ(240, capabilities->height->min); | 327 EXPECT_EQ(240, capabilities->height->min); |
328 EXPECT_EQ(1080, capabilities->height->max); | 328 EXPECT_EQ(1080, capabilities->height->max); |
329 EXPECT_EQ(capture_params.requested_format.frame_size.width(), | 329 EXPECT_EQ(capture_params.requested_format.frame_size.width(), |
330 capabilities->width->current); | 330 capabilities->width->current); |
331 EXPECT_EQ(320, capabilities->width->min); | 331 EXPECT_EQ(320, capabilities->width->min); |
332 EXPECT_EQ(1920, capabilities->width->max); | 332 EXPECT_EQ(1920, capabilities->width->max); |
333 EXPECT_EQ(100, capabilities->zoom->min); | 333 EXPECT_EQ(100, capabilities->zoom->min); |
334 EXPECT_EQ(400, capabilities->zoom->max); | 334 EXPECT_EQ(400, capabilities->zoom->max); |
335 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min); | 335 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min); |
336 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current); | 336 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current); |
337 EXPECT_EQ(mojom::MeteringMode::UNAVAILABLE, capabilities->focus_mode); | 337 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->focus_mode); |
338 EXPECT_EQ(mojom::MeteringMode::UNAVAILABLE, capabilities->exposure_mode); | 338 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->exposure_mode); |
339 EXPECT_EQ(0, capabilities->exposure_compensation->min); | 339 EXPECT_EQ(0, capabilities->exposure_compensation->min); |
340 EXPECT_EQ(0, capabilities->exposure_compensation->max); | 340 EXPECT_EQ(0, capabilities->exposure_compensation->max); |
341 EXPECT_EQ(0, capabilities->exposure_compensation->current); | 341 EXPECT_EQ(0, capabilities->exposure_compensation->current); |
342 EXPECT_EQ(mojom::MeteringMode::UNAVAILABLE, capabilities->white_balance_mode); | 342 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->white_balance_mode); |
| 343 EXPECT_EQ(mojom::FillLightMode::NONE, capabilities->fill_light_mode); |
343 | 344 |
344 // Set options: zoom to the maximum value. | 345 // Set options: zoom to the maximum value. |
345 const int max_zoom_value = capabilities->zoom->max; | 346 const int max_zoom_value = capabilities->zoom->max; |
346 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( | 347 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( |
347 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, | 348 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, |
348 image_capture_client_), | 349 image_capture_client_), |
349 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, | 350 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, |
350 image_capture_client_)); | 351 image_capture_client_)); |
351 | 352 |
352 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); | 353 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 426 } |
426 } | 427 } |
427 | 428 |
428 INSTANTIATE_TEST_CASE_P(, | 429 INSTANTIATE_TEST_CASE_P(, |
429 FakeVideoCaptureDeviceCommandLineTest, | 430 FakeVideoCaptureDeviceCommandLineTest, |
430 Values(CommandLineTestData{"fps=-1", 5}, | 431 Values(CommandLineTestData{"fps=-1", 5}, |
431 CommandLineTestData{"fps=29.97", 29.97f}, | 432 CommandLineTestData{"fps=29.97", 29.97f}, |
432 CommandLineTestData{"fps=60", 60}, | 433 CommandLineTestData{"fps=60", 60}, |
433 CommandLineTestData{"fps=1000", 60})); | 434 CommandLineTestData{"fps=1000", 60})); |
434 }; // namespace media | 435 }; // namespace media |
OLD | NEW |