| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::NONE, capabilities->focus_mode); | 337 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->focus_mode); |
| 338 EXPECT_EQ(mojom::MeteringMode::NONE, 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::NONE, 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 EXPECT_EQ(mojom::FillLightMode::NONE, capabilities->fill_light_mode); |
| 344 EXPECT_FALSE(capabilities->red_eye_reduction); |
| 344 | 345 |
| 345 // Set options: zoom to the maximum value. | 346 // Set options: zoom to the maximum value. |
| 346 const int max_zoom_value = capabilities->zoom->max; | 347 const int max_zoom_value = capabilities->zoom->max; |
| 347 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( | 348 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( |
| 348 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, | 349 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, |
| 349 image_capture_client_), | 350 image_capture_client_), |
| 350 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, | 351 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, |
| 351 image_capture_client_)); | 352 image_capture_client_)); |
| 352 | 353 |
| 353 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); | 354 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 } | 427 } |
| 427 } | 428 } |
| 428 | 429 |
| 429 INSTANTIATE_TEST_CASE_P(, | 430 INSTANTIATE_TEST_CASE_P(, |
| 430 FakeVideoCaptureDeviceCommandLineTest, | 431 FakeVideoCaptureDeviceCommandLineTest, |
| 431 Values(CommandLineTestData{"fps=-1", 5}, | 432 Values(CommandLineTestData{"fps=-1", 5}, |
| 432 CommandLineTestData{"fps=29.97", 29.97f}, | 433 CommandLineTestData{"fps=29.97", 29.97f}, |
| 433 CommandLineTestData{"fps=60", 60}, | 434 CommandLineTestData{"fps=60", 60}, |
| 434 CommandLineTestData{"fps=1000", 60})); | 435 CommandLineTestData{"fps=1000", 60})); |
| 435 }; // namespace media | 436 }; // namespace media |
| OLD | NEW |