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

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

Issue 2798063004: Move AudioDecoder and AudioDecoderFactory mocks to webrtc/test/ (Closed)
Patch Set: Created 3 years, 8 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 /* 1 /*
2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <memory> 11 #include <memory>
12 12
13 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h" 13 #include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
14 #include "webrtc/base/arraysize.h" 14 #include "webrtc/base/arraysize.h"
15 #include "webrtc/base/byteorder.h" 15 #include "webrtc/base/byteorder.h"
16 #include "webrtc/base/safe_conversions.h" 16 #include "webrtc/base/safe_conversions.h"
17 #include "webrtc/call/call.h" 17 #include "webrtc/call/call.h"
18 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 18 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
19 #include "webrtc/media/base/fakemediaengine.h" 19 #include "webrtc/media/base/fakemediaengine.h"
20 #include "webrtc/media/base/fakenetworkinterface.h" 20 #include "webrtc/media/base/fakenetworkinterface.h"
21 #include "webrtc/media/base/fakertp.h" 21 #include "webrtc/media/base/fakertp.h"
22 #include "webrtc/media/base/mediaconstants.h" 22 #include "webrtc/media/base/mediaconstants.h"
23 #include "webrtc/media/engine/fakewebrtccall.h" 23 #include "webrtc/media/engine/fakewebrtccall.h"
24 #include "webrtc/media/engine/fakewebrtcvoiceengine.h" 24 #include "webrtc/media/engine/fakewebrtcvoiceengine.h"
25 #include "webrtc/media/engine/webrtcvoiceengine.h" 25 #include "webrtc/media/engine/webrtcvoiceengine.h"
26 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h"
27 #include "webrtc/modules/audio_device/include/mock_audio_device.h" 26 #include "webrtc/modules/audio_device/include/mock_audio_device.h"
28 #include "webrtc/modules/audio_processing/include/mock_audio_processing.h" 27 #include "webrtc/modules/audio_processing/include/mock_audio_processing.h"
29 #include "webrtc/pc/channel.h" 28 #include "webrtc/pc/channel.h"
30 #include "webrtc/test/field_trial.h" 29 #include "webrtc/test/field_trial.h"
31 #include "webrtc/test/gtest.h" 30 #include "webrtc/test/gtest.h"
31 #include "webrtc/test/mock_audio_decoder_factory.h"
32 #include "webrtc/voice_engine/transmit_mixer.h" 32 #include "webrtc/voice_engine/transmit_mixer.h"
33 33
34 using testing::ContainerEq; 34 using testing::ContainerEq;
35 using testing::Return; 35 using testing::Return;
36 using testing::StrictMock; 36 using testing::StrictMock;
37 37
38 namespace { 38 namespace {
39 39
40 constexpr uint32_t kMaxUnsignaledRecvStreams = 1; 40 constexpr uint32_t kMaxUnsignaledRecvStreams = 1;
41 41
(...skipping 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after
3841 // Without this cast, the comparison turned unsigned and, thus, failed for -1. 3841 // Without this cast, the comparison turned unsigned and, thus, failed for -1.
3842 const int num_specs = static_cast<int>(specs.size()); 3842 const int num_specs = static_cast<int>(specs.size());
3843 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs); 3843 EXPECT_GE(find_codec({"cn", 8000, 1}), num_specs);
3844 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs); 3844 EXPECT_GE(find_codec({"cn", 16000, 1}), num_specs);
3845 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1); 3845 EXPECT_EQ(find_codec({"cn", 32000, 1}), -1);
3846 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs); 3846 EXPECT_GE(find_codec({"telephone-event", 8000, 1}), num_specs);
3847 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs); 3847 EXPECT_GE(find_codec({"telephone-event", 16000, 1}), num_specs);
3848 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs); 3848 EXPECT_GE(find_codec({"telephone-event", 32000, 1}), num_specs);
3849 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs); 3849 EXPECT_GE(find_codec({"telephone-event", 48000, 1}), num_specs);
3850 } 3850 }
OLDNEW
« no previous file with comments | « webrtc/media/engine/nullwebrtcvideoengine_unittest.cc ('k') | webrtc/modules/audio_coding/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698