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

Unified Diff: media/audio/linux/alsa_output_unittest.cc

Issue 9234066: Detect errors in audio output and report them upstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_output_unittest.cc
diff --git a/media/audio/linux/alsa_output_unittest.cc b/media/audio/linux/alsa_output_unittest.cc
index f1870d2fc7d2953d1d54c86ba30c05062ff37de3..a8359f6090748a90a76f7ea754f563de235d4a0a 100644
--- a/media/audio/linux/alsa_output_unittest.cc
+++ b/media/audio/linux/alsa_output_unittest.cc
@@ -355,11 +355,10 @@ TEST_F(AlsaPcmOutputStreamTest, PcmOpenFailed) {
EXPECT_CALL(mock_alsa_wrapper_, StrError(kTestFailedErrno))
.WillOnce(Return(kDummyMessage));
- ASSERT_TRUE(test_stream_->Open());
- ASSERT_EQ(AlsaPcmOutputStream::kIsOpened, test_stream_->state());
+ ASSERT_FALSE(test_stream_->Open());
+ ASSERT_EQ(AlsaPcmOutputStream::kInError, test_stream_->state());
// Ensure internal state is set for a no-op stream if PcmOpen() failes.
- EXPECT_EQ(AlsaPcmOutputStream::kIsOpened, test_stream_->state());
EXPECT_TRUE(test_stream_->stop_stream_);
EXPECT_TRUE(test_stream_->playback_handle_ == NULL);
EXPECT_FALSE(test_stream_->buffer_.get());
@@ -384,11 +383,10 @@ TEST_F(AlsaPcmOutputStreamTest, PcmSetParamsFailed) {
// If open fails, the stream stays in kCreated because it has effectively had
// no changes.
- ASSERT_TRUE(test_stream_->Open());
- EXPECT_EQ(AlsaPcmOutputStream::kIsOpened, test_stream_->state());
+ ASSERT_FALSE(test_stream_->Open());
+ EXPECT_EQ(AlsaPcmOutputStream::kInError, test_stream_->state());
// Ensure internal state is set for a no-op stream if PcmSetParams() failes.
- EXPECT_EQ(AlsaPcmOutputStream::kIsOpened, test_stream_->state());
EXPECT_TRUE(test_stream_->stop_stream_);
EXPECT_TRUE(test_stream_->playback_handle_ == NULL);
EXPECT_FALSE(test_stream_->buffer_.get());
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698