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

Unified Diff: media/audio/audio_parameters_unittest.cc

Issue 1275783003: Add a virtual beamforming audio device on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Chromebook not booting. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_parameters_unittest.cc
diff --git a/media/audio/audio_parameters_unittest.cc b/media/audio/audio_parameters_unittest.cc
index 92677eb6c6ee98511c22c573b92d21e40c1db011..6e3132aaf75308c8c1b3d1cb5c5ed3ba0b90e457 100644
--- a/media/audio/audio_parameters_unittest.cc
+++ b/media/audio/audio_parameters_unittest.cc
@@ -16,6 +16,9 @@ TEST(AudioParameters, Constructor_Default) {
ChannelLayout expected_channel_layout = CHANNEL_LAYOUT_NONE;
int expected_rate = 0;
int expected_samples = 0;
+ std::vector<Point> expected_mic_positions;
+ AudioParameters::PlatformEffectsMask expected_effects =
+ AudioParameters::NO_EFFECTS;
AudioParameters params;
@@ -25,6 +28,8 @@ TEST(AudioParameters, Constructor_Default) {
EXPECT_EQ(expected_channel_layout, params.channel_layout());
EXPECT_EQ(expected_rate, params.sample_rate());
EXPECT_EQ(expected_samples, params.frames_per_buffer());
+ EXPECT_EQ(expected_mic_positions, params.mic_positions());
+ EXPECT_EQ(expected_effects, params.effects());
}
TEST(AudioParameters, Constructor_ParameterValues) {
@@ -35,9 +40,13 @@ TEST(AudioParameters, Constructor_ParameterValues) {
ChannelLayout expected_channel_layout = CHANNEL_LAYOUT_5_1;
int expected_rate = 44100;
int expected_samples = 880;
+ std::vector<Point> expected_mic_positions(2, Point(0, 0, 0));
+ AudioParameters::PlatformEffectsMask expected_effects =
+ AudioParameters::ECHO_CANCELLER;
AudioParameters params(expected_format, expected_channel_layout,
- expected_rate, expected_bits, expected_samples);
+ expected_rate, expected_bits, expected_samples,
+ expected_mic_positions, expected_effects);
EXPECT_EQ(expected_format, params.format());
EXPECT_EQ(expected_bits, params.bits_per_sample());
@@ -45,6 +54,8 @@ TEST(AudioParameters, Constructor_ParameterValues) {
EXPECT_EQ(expected_channel_layout, params.channel_layout());
EXPECT_EQ(expected_rate, params.sample_rate());
EXPECT_EQ(expected_samples, params.frames_per_buffer());
+ EXPECT_EQ(expected_mic_positions, params.mic_positions());
+ EXPECT_EQ(expected_effects, params.effects());
}
TEST(AudioParameters, GetBytesPerBuffer) {
@@ -208,8 +219,7 @@ TEST(AudioParameters, Constructor_ValidChannelCounts) {
ChannelLayout expected_layout = CHANNEL_LAYOUT_5_1;
AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
- expected_layout, expected_channels, 44100, 16, 880,
- AudioParameters::NO_EFFECTS);
+ expected_channels, expected_layout, 44100, 16, 880);
EXPECT_EQ(expected_channels, params.channels());
EXPECT_EQ(expected_layout, params.channel_layout());

Powered by Google App Engine
This is Rietveld 408576698