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

Side by Side Diff: voice_engine/test/auto_test/fixtures/after_initialization_fixture.cc

Issue 3007383002: Replace voe_auto_test (Closed)
Patch Set: reviewer comment Created 3 years, 3 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
(Empty)
1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "modules/audio_processing/include/audio_processing.h"
12 #include "voice_engine/test/auto_test/fixtures/after_initialization_fixture.h"
13
14 class TestErrorObserver : public webrtc::VoiceEngineObserver {
15 public:
16 TestErrorObserver() {}
17 virtual ~TestErrorObserver() {}
18 void CallbackOnError(int channel, int error_code) {
19 ADD_FAILURE() << "Unexpected error on channel " << channel <<
20 ": error code " << error_code;
21 }
22 };
23
24 AfterInitializationFixture::AfterInitializationFixture()
25 : error_observer_(new TestErrorObserver()) {
26 webrtc::Config config;
27 config.Set<webrtc::ExperimentalAgc>(new webrtc::ExperimentalAgc(false));
28 webrtc::AudioProcessing* audioproc = webrtc::AudioProcessing::Create(config);
29
30 EXPECT_EQ(0, voe_base_->Init(NULL, audioproc));
31 EXPECT_EQ(0, voe_base_->RegisterVoiceEngineObserver(*error_observer_));
32 }
33
34 AfterInitializationFixture::~AfterInitializationFixture() {
35 EXPECT_EQ(0, voe_base_->DeRegisterVoiceEngineObserver());
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698