Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in

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

8 years, 3 months ago by awong
6 years, 11 months ago
Evan Martin


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: 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/ View 1 chunk +3 lines, -2 lines 0 comments Download
M media/audio/linux/ View 5 chunks +11 lines, -1 line 0 comments Download


Total messages: 3 (0 generated)
8 years, 3 months ago (2010-01-09 00:10:15 UTC) #1
Evan Martin
8 years, 3 months ago (2010-01-09 00:10:42 UTC) #2
8 years, 3 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

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