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

Side by Side Diff: content/renderer/media/video_track_recorder_unittest.cc

Issue 1610473002: MediaRecorder: wire the bitRate settings in Blink and content (2nd go) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: peter@s comments Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 blink_track_.initialize(blink_source_); 60 blink_track_.initialize(blink_source_);
61 61
62 blink::WebMediaConstraints constraints; 62 blink::WebMediaConstraints constraints;
63 constraints.initialize(); 63 constraints.initialize();
64 track_ = new MediaStreamVideoTrack(mock_source_, constraints, 64 track_ = new MediaStreamVideoTrack(mock_source_, constraints,
65 MediaStreamSource::ConstraintsCallback(), 65 MediaStreamSource::ConstraintsCallback(),
66 true /* enabled */); 66 true /* enabled */);
67 blink_track_.setExtraData(track_); 67 blink_track_.setExtraData(track_);
68 68
69 video_track_recorder_.reset(new VideoTrackRecorder( 69 video_track_recorder_.reset(new VideoTrackRecorder(
70 GetParam().use_vp9 /* use_vp9 */, 70 GetParam().use_vp9 /* use_vp9 */, blink_track_,
71 blink_track_,
72 base::Bind(&VideoTrackRecorderTest::OnEncodedVideo, 71 base::Bind(&VideoTrackRecorderTest::OnEncodedVideo,
73 base::Unretained(this)))); 72 base::Unretained(this)),
73 0 /* bits_per_second */));
74 // Paranoia checks. 74 // Paranoia checks.
75 EXPECT_EQ(blink_track_.source().extraData(), blink_source_.extraData()); 75 EXPECT_EQ(blink_track_.source().extraData(), blink_source_.extraData());
76 EXPECT_TRUE(message_loop_.IsCurrent()); 76 EXPECT_TRUE(message_loop_.IsCurrent());
77 } 77 }
78 78
79 ~VideoTrackRecorderTest() { 79 ~VideoTrackRecorderTest() {
80 blink_track_.reset(); 80 blink_track_.reset();
81 blink_source_.reset(); 81 blink_source_.reset();
82 video_track_recorder_.reset(); 82 video_track_recorder_.reset();
83 blink::WebHeap::collectAllGarbageForTesting(); 83 blink::WebHeap::collectAllGarbageForTesting();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 third_frame_encoded_data.size()); 176 third_frame_encoded_data.size());
177 177
178 Mock::VerifyAndClearExpectations(this); 178 Mock::VerifyAndClearExpectations(this);
179 } 179 }
180 180
181 INSTANTIATE_TEST_CASE_P(, 181 INSTANTIATE_TEST_CASE_P(,
182 VideoTrackRecorderTest, 182 VideoTrackRecorderTest,
183 ValuesIn(kTrackRecorderTestParams)); 183 ValuesIn(kTrackRecorderTestParams));
184 184
185 } // namespace content 185 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698