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

Side by Side Diff: content/renderer/media/webrtc/webrtc_local_audio_track_adapter_unittest.cc

Issue 293023003: Change kEnableAudioTrackProcessing to a disable flag and remove finch code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits to fix more bots. Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "content/public/common/content_switches.h" 6 #include "content/public/common/content_switches.h"
7 #include "content/renderer/media/mock_media_constraint_factory.h" 7 #include "content/renderer/media/mock_media_constraint_factory.h"
8 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h" 8 #include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
9 #include "content/renderer/media/webrtc_local_audio_track.h" 9 #include "content/renderer/media/webrtc_local_audio_track.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 sink.reset(); 81 sink.reset();
82 82
83 // Verify that no more callback gets into the sink. 83 // Verify that no more callback gets into the sink.
84 track_->Capture(data.get(), base::TimeDelta(), 255, false, false); 84 track_->Capture(data.get(), base::TimeDelta(), 255, false, false);
85 } 85 }
86 86
87 TEST_F(WebRtcLocalAudioTrackAdapterTest, GetSignalLevel) { 87 TEST_F(WebRtcLocalAudioTrackAdapterTest, GetSignalLevel) {
88 webrtc::AudioTrackInterface* webrtc_track = 88 webrtc::AudioTrackInterface* webrtc_track =
89 static_cast<webrtc::AudioTrackInterface*>(adapter_.get()); 89 static_cast<webrtc::AudioTrackInterface*>(adapter_.get());
90 int signal_level = 0; 90 int signal_level = 0;
91 EXPECT_TRUE(webrtc_track->GetSignalLevel(&signal_level));
92
93 // Disable the audio processing in the audio track.
94 CommandLine::ForCurrentProcess()->AppendSwitch(
95 switches::kDisableAudioTrackProcessing);
91 EXPECT_FALSE(webrtc_track->GetSignalLevel(&signal_level)); 96 EXPECT_FALSE(webrtc_track->GetSignalLevel(&signal_level));
92
93 // Enable the audio processing in the audio track.
94 CommandLine::ForCurrentProcess()->AppendSwitch(
95 switches::kEnableAudioTrackProcessing);
96 EXPECT_TRUE(webrtc_track->GetSignalLevel(&signal_level));
97 } 97 }
98 98
99 } // namespace content 99 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698