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

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

Issue 1915793002: Remove a |readonly| member of MediaStreamTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a |readonly| argument in unittest files Created 4 years, 7 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 "content/renderer/media/audio_track_recorder.h" 5 #include "content/renderer/media/audio_track_recorder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // Adapted from media::WebRTCLocalAudioSourceProviderTest. 210 // Adapted from media::WebRTCLocalAudioSourceProviderTest.
211 void PrepareBlinkTrack() { 211 void PrepareBlinkTrack() {
212 scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter( 212 scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
213 WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL)); 213 WebRtcLocalAudioTrackAdapter::Create(std::string(), NULL));
214 std::unique_ptr<WebRtcLocalAudioTrack> native_track( 214 std::unique_ptr<WebRtcLocalAudioTrack> native_track(
215 new WebRtcLocalAudioTrack(adapter.get())); 215 new WebRtcLocalAudioTrack(adapter.get()));
216 blink::WebMediaStreamSource audio_source; 216 blink::WebMediaStreamSource audio_source;
217 audio_source.initialize(base::UTF8ToUTF16("dummy_source_id"), 217 audio_source.initialize(base::UTF8ToUTF16("dummy_source_id"),
218 blink::WebMediaStreamSource::TypeAudio, 218 blink::WebMediaStreamSource::TypeAudio,
219 base::UTF8ToUTF16("dummy_source_name"), 219 base::UTF8ToUTF16("dummy_source_name"),
220 false /* remote */, true /* readonly */); 220 false /* remote */);
221 blink_track_.initialize(blink::WebString::fromUTF8("audio_track"), 221 blink_track_.initialize(blink::WebString::fromUTF8("audio_track"),
222 audio_source); 222 audio_source);
223 blink_track_.setExtraData(native_track.release()); 223 blink_track_.setExtraData(native_track.release());
224 } 224 }
225 225
226 DISALLOW_COPY_AND_ASSIGN(AudioTrackRecorderTest); 226 DISALLOW_COPY_AND_ASSIGN(AudioTrackRecorderTest);
227 }; 227 };
228 228
229 TEST_P(AudioTrackRecorderTest, OnData) { 229 TEST_P(AudioTrackRecorderTest, OnData) {
230 InSequence s; 230 InSequence s;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 if (GetParam().sample_rate % 100) 295 if (GetParam().sample_rate % 100)
296 audio_track_recorder_->OnData(*GetFirstSourceAudioBus(), TimeTicks::Now()); 296 audio_track_recorder_->OnData(*GetFirstSourceAudioBus(), TimeTicks::Now());
297 297
298 run_loop.Run(); 298 run_loop.Run();
299 Mock::VerifyAndClearExpectations(this); 299 Mock::VerifyAndClearExpectations(this);
300 } 300 }
301 301
302 INSTANTIATE_TEST_CASE_P(, AudioTrackRecorderTest, ValuesIn(kATRTestParams)); 302 INSTANTIATE_TEST_CASE_P(, AudioTrackRecorderTest, ValuesIn(kATRTestParams));
303 } // namespace content 303 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/media_stream_utils.cc ('k') | content/renderer/media/canvas_capture_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698