Chromium Code Reviews| Index: webrtc/media/engine/webrtcvoiceengine_unittest.cc | 
| diff --git a/webrtc/media/engine/webrtcvoiceengine_unittest.cc b/webrtc/media/engine/webrtcvoiceengine_unittest.cc | 
| index d90695de26a310fb94cf9ef8a189c08cfd60f6aa..cacb10ae57b16108d13a01c6e6a924e0faff4280 100644 | 
| --- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc | 
| +++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc | 
| @@ -107,7 +107,8 @@ class WebRtcVoiceEngineTestFake : public testing::Test { | 
| explicit WebRtcVoiceEngineTestFake(const char* field_trials) | 
| : call_(webrtc::Call::Config(&event_log_)), voe_(&apm_), | 
| override_field_trials_(field_trials) { | 
| - auto factory = webrtc::MockAudioDecoderFactory::CreateUnusedFactory(); | 
| + auto factory = | 
| + webrtc::MockAudioDecoderFactory::CreateUnusedPotemkinFactory(); | 
| 
 
the sun
2016/12/14 08:58:24
I guess that will be explained later, but I'm not
 
ossu
2016/12/14 10:21:36
I had to google it. That said, it's pretty witty.
 
kwiberg-webrtc
2016/12/14 13:09:36
"I had to google it" and "pretty witty"---what mor
 
ossu
2016/12/14 13:53:35
I think I'd just set up the mock manually in this
 
kwiberg-webrtc
2016/12/15 14:30:50
OK, using the normal factory and adding a TODO sou
 
 | 
| EXPECT_CALL(adm_, AddRef()).WillOnce(Return(0)); | 
| EXPECT_CALL(adm_, Release()).WillOnce(Return(0)); | 
| EXPECT_CALL(adm_, BuiltInAECIsAvailable()).WillOnce(Return(false)); | 
| @@ -870,14 +871,9 @@ TEST_F(WebRtcVoiceEngineTestFake, SetRecvCodecsAfterAddingStreams) { | 
| parameters.codecs[0].id = 106; // collide with existing CN 32k | 
| EXPECT_TRUE(channel_->SetRecvParameters(parameters)); | 
| - int channel_num2 = voe_.GetLastChannel(); | 
| - webrtc::CodecInst gcodec; | 
| - rtc::strcpyn(gcodec.plname, arraysize(gcodec.plname), "ISAC"); | 
| - gcodec.plfreq = 16000; | 
| - gcodec.channels = 1; | 
| - EXPECT_EQ(0, voe_.GetRecPayloadType(channel_num2, gcodec)); | 
| - EXPECT_EQ(106, gcodec.pltype); | 
| - EXPECT_STREQ("ISAC", gcodec.plname); | 
| + const auto& dm = GetRecvStreamConfig(kSsrc1).decoder_map; | 
| + ASSERT_EQ(1, dm.count(106)); | 
| + EXPECT_EQ(webrtc::SdpAudioFormat("isac", 16000, 1), dm.at(106)); | 
| 
 
the sun
2016/12/14 08:58:25
Any reason "ISAC" changed to "isac"?
 
kwiberg-webrtc
2016/12/14 13:09:36
I re-wrote it by hand rather than copy+pasting, an
 
 | 
| } | 
| // Test that we can apply the same set of codecs again while playing. |