Chromium Code Reviews
Help | Chromium Project | Sign in
(355)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 3 months ago by awong
Modified:
2 years, 11 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) Lint Patch
M media/audio/linux/alsa_output.cc View 1 chunk +3 lines, -2 lines 0 comments 0 errors Download
M media/audio/linux/alsa_output_unittest.cc View 5 chunks +11 lines, -1 line 0 comments 0 errors Download
Commit:

Messages

Total messages: 3
awong
4 years, 3 months ago #1
Evan Martin
LGTM
4 years, 3 months ago #2
awong
4 years, 3 months ago #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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1275:d14800f88434