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

Unified Diff: content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc

Issue 2964923002: Remove unused VideoCapturerSource::GetCurrentSupportedFormats(). (Closed)
Patch Set: rebase Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media_capture_from_element/html_video_element_capturer_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc
diff --git a/content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc b/content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc
index 76a214bc958cc65b6c9f7fd32aefa6a16de7ca52..c3af903bd880cab8d97fa15f5a9ecd2f8e525048 100644
--- a/content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc
+++ b/content/renderer/media_capture_from_element/canvas_capture_handler_unittest.cc
@@ -74,12 +74,6 @@ class CanvasCaptureHandlerTest
DoOnDeliverFrame(video_frame, estimated_capture_time);
}
- MOCK_METHOD1(DoOnVideoCaptureDeviceFormats,
- void(const media::VideoCaptureFormats&));
- void OnVideoCaptureDeviceFormats(const media::VideoCaptureFormats& formats) {
- DoOnVideoCaptureDeviceFormats(formats);
- }
-
MOCK_METHOD1(DoOnRunning, void(bool));
void OnRunning(bool state) { DoOnRunning(state); }
@@ -174,16 +168,7 @@ TEST_P(CanvasCaptureHandlerTest, GetFormatsStartAndStop) {
media::VideoCapturerSource* source = GetVideoCapturerSource(ms_source);
EXPECT_TRUE(source != nullptr);
- media::VideoCaptureFormats formats;
- EXPECT_CALL(*this, DoOnVideoCaptureDeviceFormats(_))
- .Times(1)
- .WillOnce(SaveArg<0>(&formats));
- source->GetCurrentSupportedFormats(
- media::limits::kMaxCanvas /* max_requesteed_width */,
- media::limits::kMaxCanvas /* max_requesteed_height */,
- media::limits::kMaxFramesPerSecond /* max_requested_frame_rate */,
- base::Bind(&CanvasCaptureHandlerTest::OnVideoCaptureDeviceFormats,
- base::Unretained(this)));
+ media::VideoCaptureFormats formats = source->GetPreferredFormats();
ASSERT_EQ(2u, formats.size());
EXPECT_EQ(kTestCanvasCaptureWidth, formats[0].frame_size.width());
EXPECT_EQ(kTestCanvasCaptureHeight, formats[0].frame_size.height());
« no previous file with comments | « no previous file | content/renderer/media_capture_from_element/html_video_element_capturer_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698