2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
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.
11 #include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
13 // Note: This class includes sleeps and requires manual verification.
14 class ManualHoldTest : public AfterStreamingFixture {
17 TEST_F(ManualHoldTest, SetOnHoldStatusBlockAudio) {
18 TEST_LOG("Channel not on hold => should hear audio.\n");
20 TEST_LOG("Put channel on hold => should *not* hear audio.\n");
21 EXPECT_EQ(0, voe_base_->SetOnHoldStatus(channel_, true));
23 TEST_LOG("Remove on hold => should hear audio again.\n");
24 EXPECT_EQ(0, voe_base_->SetOnHoldStatus(channel_, false));
26 TEST_LOG("Put sending on hold => should *not* hear audio.\n");
27 EXPECT_EQ(0, voe_base_->SetOnHoldStatus(channel_, true, webrtc::kHoldSendOnly));
31 TEST_F(ManualHoldTest, SetOnHoldStatusBlocksLocalFileAudio) {
32 TEST_LOG("Start playing a file locally => "
33 "you should now hear this file being played out.\n");
34 voe_file_->StopPlayingFileAsMicrophone(channel_);
35 EXPECT_EQ(0, voe_file_->StartPlayingFileLocally(
36 channel_, resource_manager_.long_audio_file_path().c_str(), true));
39 TEST_LOG("Put playing on hold => should *not* hear audio.\n");
40 EXPECT_EQ(0, voe_base_->SetOnHoldStatus(
41 channel_, true, webrtc::kHoldPlayOnly));