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

Issue 542002: Retry 35837 linux: grab device name before closing it (Closed)

Created:
10 years, 11 months ago by awong
Modified:
9 years, 7 months ago
Reviewers:
Evan Martin
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Retry 35837 linux: grab device name before closing it PcmClose frees the handle regardless of whether there's an error while shutting down, so grab the PcmName result first in case we want to use it in an error message. Original Review URL: http://codereview.chromium.org/538005 BUG=20006

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -3 lines) Patch
M media/audio/linux/alsa_output.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M media/audio/linux/alsa_output_unittest.cc View 5 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
awong
10 years, 11 months ago (2010-01-09 00:10:15 UTC) #1
Evan Martin
LGTM
10 years, 11 months ago (2010-01-09 00:10:42 UTC) #2
awong
10 years, 11 months ago (2010-01-09 00:13:02 UTC) #3
For background, to mock out the ALSA dependency, wrapped the whole ALSA API with
a class "AlsaWrapper".

In the unittest, we insert a gmock verison of the wrapper.

That means, any call to the ALSA API needs to be declared as expected.

In retrospect, this is too much of a characterization test...but it's not clear
that making the mock non-strict (so we ignore extra calls) is a good idea
either.

Anyways, the fix is to add expectations for the PcmName() call you make since it
changed to being called every time the Close() command is called.

Powered by Google App Engine
This is Rietveld 408576698