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

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

Issue 2124363003: ImageCapture: Implement focus mode for Android and Fake Video Capture Devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reillyg@s nit, dcheng@ comment and updated webexposed/global-interface-listing-expected.txt Created 4 years, 5 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 device->GetPhotoCapabilities(std::move(scoped_get_callback)); 317 device->GetPhotoCapabilities(std::move(scoped_get_callback));
318 run_loop_.reset(new base::RunLoop()); 318 run_loop_.reset(new base::RunLoop());
319 run_loop_->Run(); 319 run_loop_->Run();
320 320
321 auto* capabilities = image_capture_client_->capabilities(); 321 auto* capabilities = image_capture_client_->capabilities();
322 ASSERT_TRUE(capabilities); 322 ASSERT_TRUE(capabilities);
323 EXPECT_EQ(100u, capabilities->zoom->min); 323 EXPECT_EQ(100u, capabilities->zoom->min);
324 EXPECT_EQ(400u, capabilities->zoom->max); 324 EXPECT_EQ(400u, capabilities->zoom->max);
325 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min); 325 EXPECT_GE(capabilities->zoom->current, capabilities->zoom->min);
326 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current); 326 EXPECT_GE(capabilities->zoom->max, capabilities->zoom->current);
327 EXPECT_EQ(mojom::FocusMode::UNAVAILABLE, capabilities->focus_mode);
327 328
328 // Set options: zoom to the maximum value. 329 // Set options: zoom to the maximum value.
329 const unsigned int max_zoom_value = capabilities->zoom->max; 330 const unsigned int max_zoom_value = capabilities->zoom->max;
330 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback( 331 VideoCaptureDevice::SetPhotoOptionsCallback scoped_set_callback(
331 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions, 332 base::Bind(&ImageCaptureClient::OnCorrectSetPhotoOptions,
332 image_capture_client_), 333 image_capture_client_),
333 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure, 334 base::Bind(&ImageCaptureClient::OnSetPhotoOptionsFailure,
334 image_capture_client_)); 335 image_capture_client_));
335 336
336 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New(); 337 mojom::PhotoSettingsPtr settings = mojom::PhotoSettings::New();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 409 }
409 } 410 }
410 411
411 INSTANTIATE_TEST_CASE_P(, 412 INSTANTIATE_TEST_CASE_P(,
412 FakeVideoCaptureDeviceCommandLineTest, 413 FakeVideoCaptureDeviceCommandLineTest,
413 Values(CommandLineTestData{"fps=-1", 5}, 414 Values(CommandLineTestData{"fps=-1", 5},
414 CommandLineTestData{"fps=29.97", 29.97f}, 415 CommandLineTestData{"fps=29.97", 29.97f},
415 CommandLineTestData{"fps=60", 60}, 416 CommandLineTestData{"fps=60", 60},
416 CommandLineTestData{"fps=1000", 60})); 417 CommandLineTestData{"fps=1000", 60}));
417 }; // namespace media 418 }; // 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