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

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

Issue 542002: Retry 35837 linux: grab device name before closing it (Closed)
Patch Set: Created 10 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') | no next file » | 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 72c4c90951e0821245e279650c4159bae57c0306..70949b5e7ea2c261871365f6a216ea9a28ec0e59 100644
--- a/media/audio/linux/alsa_output_unittest.cc
+++ b/media/audio/linux/alsa_output_unittest.cc
@@ -227,7 +227,9 @@ TEST_F(AlsaPcmOutputStreamTest, LatencyFloor) {
message_loop_.RunAllPending();
// Now close it and test that everything was released.
- EXPECT_CALL(mock_alsa_wrapper_, PcmClose(kFakeHandle)) .WillOnce(Return(0));
+ EXPECT_CALL(mock_alsa_wrapper_, PcmClose(kFakeHandle)).WillOnce(Return(0));
+ EXPECT_CALL(mock_alsa_wrapper_, PcmName(kFakeHandle))
+ .WillOnce(Return(kTestDeviceName));
EXPECT_CALL(mock_manager_, ReleaseStream(test_stream_.get()));
test_stream_->Close();
message_loop_.RunAllPending();
@@ -258,6 +260,8 @@ TEST_F(AlsaPcmOutputStreamTest, LatencyFloor) {
// Now close it and test that everything was released.
EXPECT_CALL(mock_alsa_wrapper_, PcmClose(kFakeHandle))
.WillOnce(Return(0));
+ EXPECT_CALL(mock_alsa_wrapper_, PcmName(kFakeHandle))
+ .WillOnce(Return(kTestDeviceName));
EXPECT_CALL(mock_manager_, ReleaseStream(test_stream_.get()));
test_stream_->Close();
message_loop_.RunAllPending();
@@ -303,6 +307,8 @@ TEST_F(AlsaPcmOutputStreamTest, OpenClose) {
// Now close it and test that everything was released.
EXPECT_CALL(mock_alsa_wrapper_, PcmClose(kFakeHandle))
.WillOnce(Return(0));
+ EXPECT_CALL(mock_alsa_wrapper_, PcmName(kFakeHandle))
+ .WillOnce(Return(kTestDeviceName));
EXPECT_CALL(mock_manager_, ReleaseStream(test_stream_.get()));
test_stream_->Close();
message_loop_.RunAllPending();
@@ -346,6 +352,8 @@ TEST_F(AlsaPcmOutputStreamTest, PcmSetParamsFailed) {
.WillOnce(Return(kTestFailedErrno));
EXPECT_CALL(mock_alsa_wrapper_, PcmClose(kFakeHandle))
.WillOnce(Return(0));
+ EXPECT_CALL(mock_alsa_wrapper_, PcmName(kFakeHandle))
+ .WillOnce(Return(kTestDeviceName));
EXPECT_CALL(mock_alsa_wrapper_, StrError(kTestFailedErrno))
.WillOnce(Return(kDummyMessage));
@@ -414,6 +422,8 @@ TEST_F(AlsaPcmOutputStreamTest, StartStop) {
EXPECT_CALL(mock_callback, OnClose(test_stream_.get()));
EXPECT_CALL(mock_alsa_wrapper_, PcmClose(kFakeHandle))
.WillOnce(Return(0));
+ EXPECT_CALL(mock_alsa_wrapper_, PcmName(kFakeHandle))
+ .WillOnce(Return(kTestDeviceName));
test_stream_->Close();
message_loop_.RunAllPending();
}
« no previous file with comments | « media/audio/linux/alsa_output.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698