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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 EXPECT_FALSE(capabilities->red_eye_reduction); |
345 EXPECT_EQ(0, capabilities->color_temperature->min); | 345 EXPECT_EQ(0, capabilities->color_temperature->min); |
346 EXPECT_EQ(0, capabilities->color_temperature->max); | 346 EXPECT_EQ(0, capabilities->color_temperature->max); |
347 EXPECT_EQ(0, capabilities->color_temperature->current); | 347 EXPECT_EQ(0, capabilities->color_temperature->current); |
| 348 EXPECT_EQ(0, capabilities->brightness->min); |
| 349 EXPECT_EQ(0, capabilities->brightness->max); |
| 350 EXPECT_EQ(0, capabilities->brightness->current); |
| 351 EXPECT_EQ(0, capabilities->contrast->min); |
| 352 EXPECT_EQ(0, capabilities->contrast->max); |
| 353 EXPECT_EQ(0, capabilities->contrast->current); |
| 354 EXPECT_EQ(0, capabilities->saturation->min); |
| 355 EXPECT_EQ(0, capabilities->saturation->max); |
| 356 EXPECT_EQ(0, capabilities->saturation->current); |
| 357 EXPECT_EQ(0, capabilities->sharpness->min); |
| 358 EXPECT_EQ(0, capabilities->sharpness->max); |
| 359 EXPECT_EQ(0, capabilities->sharpness->current); |
348 | 360 |
349 // Set options: zoom to the maximum value. | 361 // Set options: zoom to the maximum value. |
350 const int max_zoom_value = capabilities->zoom->max; | 362 const int max_zoom_value = capabilities->zoom->max; |
351 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( | 363 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( |
352 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, | 364 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, |
353 image_capture_client_), | 365 image_capture_client_), |
354 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, | 366 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, |
355 image_capture_client_)); | 367 image_capture_client_)); |
356 | 368 |
357 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); | 369 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 } | 442 } |
431 } | 443 } |
432 | 444 |
433 INSTANTIATE_TEST_CASE_P(, | 445 INSTANTIATE_TEST_CASE_P(, |
434 FakeVideoCaptureDeviceCommandLineTest, | 446 FakeVideoCaptureDeviceCommandLineTest, |
435 Values(CommandLineTestData{"fps=-1", 5}, | 447 Values(CommandLineTestData{"fps=-1", 5}, |
436 CommandLineTestData{"fps=29.97", 29.97f}, | 448 CommandLineTestData{"fps=29.97", 29.97f}, |
437 CommandLineTestData{"fps=60", 60}, | 449 CommandLineTestData{"fps=60", 60}, |
438 CommandLineTestData{"fps=1000", 60})); | 450 CommandLineTestData{"fps=1000", 60})); |
439 }; // namespace media | 451 }; // namespace media |
OLD | NEW |