| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 run_loop_->Run(); | 331 run_loop_->Run(); |
| 332 | 332 |
| 333 auto* capabilities = image_capture_client_->capabilities(); | 333 auto* capabilities = image_capture_client_->capabilities(); |
| 334 ASSERT_TRUE(capabilities); | 334 ASSERT_TRUE(capabilities); |
| 335 EXPECT_EQ(100, capabilities->iso->min); | 335 EXPECT_EQ(100, capabilities->iso->min); |
| 336 EXPECT_EQ(100, capabilities->iso->max); | 336 EXPECT_EQ(100, capabilities->iso->max); |
| 337 EXPECT_EQ(100, capabilities->iso->current); | 337 EXPECT_EQ(100, capabilities->iso->current); |
| 338 EXPECT_EQ(0, capabilities->iso->step); | 338 EXPECT_EQ(0, capabilities->iso->step); |
| 339 EXPECT_EQ(capture_params.requested_format.frame_size.height(), | 339 EXPECT_EQ(capture_params.requested_format.frame_size.height(), |
| 340 capabilities->height->current); | 340 capabilities->height->current); |
| 341 EXPECT_EQ(240, capabilities->height->min); | 341 EXPECT_EQ(96, capabilities->height->min); |
| 342 EXPECT_EQ(1080, capabilities->height->max); | 342 EXPECT_EQ(1080, capabilities->height->max); |
| 343 EXPECT_EQ(1, capabilities->height->step); | 343 EXPECT_EQ(1, capabilities->height->step); |
| 344 EXPECT_EQ(capture_params.requested_format.frame_size.width(), | 344 EXPECT_EQ(capture_params.requested_format.frame_size.width(), |
| 345 capabilities->width->current); | 345 capabilities->width->current); |
| 346 EXPECT_EQ(320, capabilities->width->min); | 346 EXPECT_EQ(96, capabilities->width->min); |
| 347 EXPECT_EQ(1920, capabilities->width->max); | 347 EXPECT_EQ(1920, capabilities->width->max); |
| 348 EXPECT_EQ(1, capabilities->width->step); | 348 EXPECT_EQ(1, capabilities->width->step); |
| 349 EXPECT_EQ(100, capabilities->zoom->min); | 349 EXPECT_EQ(100, capabilities->zoom->min); |
| 350 EXPECT_EQ(400, capabilities->zoom->max); | 350 EXPECT_EQ(400, capabilities->zoom->max); |
| 351 EXPECT_EQ(1, capabilities->zoom->step); | 351 EXPECT_EQ(1, capabilities->zoom->step); |
| 352 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min); | 352 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min); |
| 353 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current); | 353 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current); |
| 354 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->focus_mode); | 354 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->focus_mode); |
| 355 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->exposure_mode); | 355 EXPECT_EQ(mojom::MeteringMode::NONE, capabilities->exposure_mode); |
| 356 EXPECT_EQ(0, capabilities->exposure_compensation->min); | 356 EXPECT_EQ(0, capabilities->exposure_compensation->min); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 INSTANTIATE_TEST_CASE_P( | 468 INSTANTIATE_TEST_CASE_P( |
| 469 , | 469 , |
| 470 FakeVideoCaptureDeviceCommandLineTest, | 470 FakeVideoCaptureDeviceCommandLineTest, |
| 471 Values(CommandLineTestData{"fps=-1", 5, 1u}, | 471 Values(CommandLineTestData{"fps=-1", 5, 1u}, |
| 472 CommandLineTestData{"fps=29.97, device-count=1", 29.97f, 1u}, | 472 CommandLineTestData{"fps=29.97, device-count=1", 29.97f, 1u}, |
| 473 CommandLineTestData{"fps=60, device-count=2", 60, 2u}, | 473 CommandLineTestData{"fps=60, device-count=2", 60, 2u}, |
| 474 CommandLineTestData{"fps=1000, device-count=-1", 60, 1u}, | 474 CommandLineTestData{"fps=1000, device-count=-1", 60, 1u}, |
| 475 CommandLineTestData{"device-count=2", 20, 2u}, | 475 CommandLineTestData{"device-count=2", 20, 2u}, |
| 476 CommandLineTestData{"device-count=0", 20, 1u})); | 476 CommandLineTestData{"device-count=0", 20, 1u})); |
| 477 }; // namespace media | 477 }; // namespace media |
| OLD | NEW |