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

Side by Side Diff: talk/media/webrtc/webrtcvoiceengine_unittest.cc

Issue 1457653003: Remove SetVideoLogging/SetAudioLogging from ChannelManager and down the stack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: moar dy Created 5 years, 1 month 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 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2008 Google Inc. 3 * Copyright 2008 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 options.playout_sample_rate = rtc::Optional<uint32_t>(44100); 2310 options.playout_sample_rate = rtc::Optional<uint32_t>(44100);
2311 EXPECT_TRUE(engine_.SetOptions(options)); 2311 EXPECT_TRUE(engine_.SetOptions(options));
2312 2312
2313 unsigned int recording_sample_rate, playout_sample_rate; 2313 unsigned int recording_sample_rate, playout_sample_rate;
2314 EXPECT_EQ(0, voe_.RecordingSampleRate(&recording_sample_rate)); 2314 EXPECT_EQ(0, voe_.RecordingSampleRate(&recording_sample_rate));
2315 EXPECT_EQ(0, voe_.PlayoutSampleRate(&playout_sample_rate)); 2315 EXPECT_EQ(0, voe_.PlayoutSampleRate(&playout_sample_rate));
2316 EXPECT_EQ(48000u, recording_sample_rate); 2316 EXPECT_EQ(48000u, recording_sample_rate);
2317 EXPECT_EQ(44100u, playout_sample_rate); 2317 EXPECT_EQ(44100u, playout_sample_rate);
2318 } 2318 }
2319 2319
2320 /* !!!!!!!!!!!!!!!! Fix!
2321
2320 TEST_F(WebRtcVoiceEngineTestFake, TraceFilterViaTraceOptions) { 2322 TEST_F(WebRtcVoiceEngineTestFake, TraceFilterViaTraceOptions) {
2321 EXPECT_TRUE(SetupEngineWithSendStream()); 2323 EXPECT_TRUE(SetupEngineWithSendStream());
2322 engine_.SetLogging(rtc::LS_INFO, ""); 2324 engine_.SetLogging(rtc::LS_INFO, "");
2323 EXPECT_EQ( 2325 EXPECT_EQ(
2324 // Info: 2326 // Info:
2325 webrtc::kTraceStateInfo | webrtc::kTraceInfo | 2327 webrtc::kTraceStateInfo | webrtc::kTraceInfo |
2326 // Warning: 2328 // Warning:
2327 webrtc::kTraceTerseInfo | webrtc::kTraceWarning | 2329 webrtc::kTraceTerseInfo | webrtc::kTraceWarning |
2328 // Error: 2330 // Error:
2329 webrtc::kTraceError | webrtc::kTraceCritical, 2331 webrtc::kTraceError | webrtc::kTraceCritical,
2330 static_cast<int>(trace_wrapper_->filter_)); 2332 static_cast<int>(trace_wrapper_->filter_));
2331 // Now set it explicitly 2333 // Now set it explicitly
2332 std::string filter = 2334 std::string filter =
2333 "tracefilter " + rtc::ToString(webrtc::kTraceDefault); 2335 "tracefilter " + rtc::ToString(webrtc::kTraceDefault);
2334 engine_.SetLogging(rtc::LS_VERBOSE, filter.c_str()); 2336 engine_.SetLogging(rtc::LS_VERBOSE, filter.c_str());
2335 EXPECT_EQ(static_cast<unsigned int>(webrtc::kTraceDefault), 2337 EXPECT_EQ(static_cast<unsigned int>(webrtc::kTraceDefault),
2336 trace_wrapper_->filter_); 2338 trace_wrapper_->filter_);
2337 } 2339 }
2340 */
pthatcher1 2015/11/18 19:26:26 Wouldn't this test just go away?
the sun 2015/11/19 15:55:12 Done.
2338 2341
2339 // Test that we can set the outgoing SSRC properly. 2342 // Test that we can set the outgoing SSRC properly.
2340 // SSRC is set in SetupEngine by calling AddSendStream. 2343 // SSRC is set in SetupEngine by calling AddSendStream.
2341 TEST_F(WebRtcVoiceEngineTestFake, SetSendSsrc) { 2344 TEST_F(WebRtcVoiceEngineTestFake, SetSendSsrc) {
2342 EXPECT_TRUE(SetupEngineWithSendStream()); 2345 EXPECT_TRUE(SetupEngineWithSendStream());
2343 EXPECT_TRUE(call_.GetAudioSendStream(kSsrc1)); 2346 EXPECT_TRUE(call_.GetAudioSendStream(kSsrc1));
2344 } 2347 }
2345 2348
2346 TEST_F(WebRtcVoiceEngineTestFake, GetStats) { 2349 TEST_F(WebRtcVoiceEngineTestFake, GetStats) {
2347 // Setup. We need send codec to be set to get all stats. 2350 // Setup. We need send codec to be set to get all stats.
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 cricket::WebRtcVoiceEngine engine; 3323 cricket::WebRtcVoiceEngine engine;
3321 EXPECT_TRUE(engine.Init(rtc::Thread::Current())); 3324 EXPECT_TRUE(engine.Init(rtc::Thread::Current()));
3322 rtc::scoped_ptr<webrtc::Call> call( 3325 rtc::scoped_ptr<webrtc::Call> call(
3323 webrtc::Call::Create(webrtc::Call::Config())); 3326 webrtc::Call::Create(webrtc::Call::Config()));
3324 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(), 3327 cricket::WebRtcVoiceMediaChannel channel(&engine, cricket::AudioOptions(),
3325 call.get()); 3328 call.get());
3326 cricket::AudioRecvParameters parameters; 3329 cricket::AudioRecvParameters parameters;
3327 parameters.codecs = engine.codecs(); 3330 parameters.codecs = engine.codecs();
3328 EXPECT_TRUE(channel.SetRecvParameters(parameters)); 3331 EXPECT_TRUE(channel.SetRecvParameters(parameters));
3329 } 3332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698