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

Unified Diff: talk/media/webrtc/webrtcvoiceengine_unittest.cc

Issue 1487393002: Refactor WVoE DTMF handling #1 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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 | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | talk/session/media/channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine_unittest.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine_unittest.cc b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
index 888de7d8a485e4254a9edaa898efa06edf75a080..61f17db927c576b30c541a1a5f64c5c57a7b5075 100644
--- a/talk/media/webrtc/webrtcvoiceengine_unittest.cc
+++ b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
@@ -148,39 +148,26 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
EXPECT_TRUE(channel_->SetSend(cricket::SEND_MICROPHONE));
EXPECT_FALSE(channel_->CanInsertDtmf());
- EXPECT_FALSE(channel_->InsertDtmf(ssrc, 1, 111, cricket::DF_SEND));
+ EXPECT_FALSE(channel_->InsertDtmf(ssrc, 1, 111));
send_parameters_.codecs.push_back(kTelephoneEventCodec);
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
EXPECT_TRUE(channel_->CanInsertDtmf());
if (!caller) {
// If this is callee, there's no active send channel yet.
- EXPECT_FALSE(channel_->InsertDtmf(ssrc, 2, 123, cricket::DF_SEND));
+ EXPECT_FALSE(channel_->InsertDtmf(ssrc, 2, 123));
EXPECT_TRUE(channel_->AddSendStream(
cricket::StreamParams::CreateLegacy(kSsrc1)));
}
// Check we fail if the ssrc is invalid.
- EXPECT_FALSE(channel_->InsertDtmf(-1, 1, 111, cricket::DF_SEND));
+ EXPECT_FALSE(channel_->InsertDtmf(-1, 1, 111));
// Test send
int channel_id = voe_.GetLastChannel();
EXPECT_FALSE(voe_.WasSendTelephoneEventCalled(channel_id, 2, 123));
- EXPECT_TRUE(channel_->InsertDtmf(ssrc, 2, 123, cricket::DF_SEND));
+ EXPECT_TRUE(channel_->InsertDtmf(ssrc, 2, 123));
EXPECT_TRUE(voe_.WasSendTelephoneEventCalled(channel_id, 2, 123));
-
- // Test play
- EXPECT_FALSE(voe_.WasPlayDtmfToneCalled(3, 134));
- EXPECT_TRUE(channel_->InsertDtmf(ssrc, 3, 134, cricket::DF_PLAY));
- EXPECT_TRUE(voe_.WasPlayDtmfToneCalled(3, 134));
-
- // Test send and play
- EXPECT_FALSE(voe_.WasSendTelephoneEventCalled(channel_id, 4, 145));
- EXPECT_FALSE(voe_.WasPlayDtmfToneCalled(4, 145));
- EXPECT_TRUE(channel_->InsertDtmf(ssrc, 4, 145,
- cricket::DF_PLAY | cricket::DF_SEND));
- EXPECT_TRUE(voe_.WasSendTelephoneEventCalled(channel_id, 4, 145));
- EXPECT_TRUE(voe_.WasPlayDtmfToneCalled(4, 145));
}
// Test that send bandwidth is set correctly.
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | talk/session/media/channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698