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

Unified Diff: media/audio/audio_parameters_unittest.cc

Issue 1304973005: Refactor AudioParameters member setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cross-platform. 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..2cf541d14c381e99c614643696800222286e90ea 100644
--- a/media/audio/audio_parameters_unittest.cc
+++ b/media/audio/audio_parameters_unittest.cc
@@ -205,20 +205,11 @@ TEST(AudioParameters, Compare) {
TEST(AudioParameters, Constructor_ValidChannelCounts) {
int expected_channels = 8;
- ChannelLayout expected_layout = CHANNEL_LAYOUT_5_1;
+ ChannelLayout expected_layout = CHANNEL_LAYOUT_DISCRETE;
AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
- expected_layout, expected_channels, 44100, 16, 880,
- AudioParameters::NO_EFFECTS);
-
- EXPECT_EQ(expected_channels, params.channels());
- EXPECT_EQ(expected_layout, params.channel_layout());
- EXPECT_FALSE(params.IsValid());
-
- expected_layout = CHANNEL_LAYOUT_DISCRETE;
- params.Reset(AudioParameters::AUDIO_PCM_LOW_LATENCY, expected_layout,
- expected_channels, 44100, 16, 880);
-
+ expected_layout, 44100, 16, 880);
+ params.set_channels_for_discrete(expected_channels);
EXPECT_EQ(expected_channels, params.channels());
EXPECT_EQ(expected_layout, params.channel_layout());
EXPECT_TRUE(params.IsValid());

Powered by Google App Engine
This is Rietveld 408576698