Chromium Code Reviews| Index: media/audio/android/audio_android_unittest.cc |
| diff --git a/media/audio/android/audio_android_unittest.cc b/media/audio/android/audio_android_unittest.cc |
| index b883d13afe799d615c3fb2142d47155740183a97..23e50ceab91866e231355dbffc7429b3527bd55d 100644 |
| --- a/media/audio/android/audio_android_unittest.cc |
| +++ b/media/audio/android/audio_android_unittest.cc |
| @@ -93,9 +93,10 @@ double ExpectedTimeBetweenCallbacks(AudioParameters params) { |
| // Helper method which verifies that the device list starts with a valid |
| // default device name followed by non-default device names. |
| -void CheckDeviceNames(const AudioDeviceNames& device_names) { |
| - DVLOG(2) << "Got " << device_names.size() << " audio devices."; |
| - if (device_names.empty()) { |
| +void CheckDeviceDescriptions( |
| + const AudioDeviceDescriptions& device_descriptions) { |
| + DVLOG(2) << "Got " << device_descriptions.size() << " audio devices."; |
| + if (device_descriptions.empty()) { |
| // Log a warning so we can see the status on the build bots. No need to |
| // break the test though since this does successfully test the code and |
| // some failure cases. |
| @@ -103,7 +104,7 @@ void CheckDeviceNames(const AudioDeviceNames& device_names) { |
| return; |
| } |
| - AudioDeviceNames::const_iterator it = device_names.begin(); |
| + AudioDeviceDescriptions::const_iterator it = device_descriptions.begin(); |
| // The first device in the list should always be the default device. |
| EXPECT_EQ(AudioDeviceDescription::GetDefaultDeviceName(), it->device_name); |
| @@ -113,7 +114,7 @@ void CheckDeviceNames(const AudioDeviceNames& device_names) { |
| // Other devices should have non-empty name and id and should not contain |
| // default name or id. |
| - while (it != device_names.end()) { |
| + while (it != device_descriptions.end()) { |
| EXPECT_FALSE(it->device_name.empty()); |
| EXPECT_FALSE(it->unique_id.empty()); |
| DVLOG(2) << "Device ID(" << it->unique_id |
|
Guido Urdaneta
2016/12/08 15:53:37
Should you check anything about group ID here?
o1ka
2016/12/09 14:56:30
Done.
|
| @@ -739,25 +740,21 @@ TEST_F(AudioAndroidOutputTest, GetDefaultOutputStreamParameters) { |
| } |
| // Verify input device enumeration. |
| -TEST_F(AudioAndroidInputTest, GetAudioInputDeviceNames) { |
| +TEST_F(AudioAndroidInputTest, GetAudioInputDeviceDescriptions) { |
| ABORT_AUDIO_TEST_IF_NOT(audio_manager()->HasAudioInputDevices()); |
| - AudioDeviceNames devices; |
| - RunOnAudioThread( |
| - base::Bind(&AudioManager::GetAudioInputDeviceNames, |
| - base::Unretained(audio_manager()), |
| - &devices)); |
| - CheckDeviceNames(devices); |
| + AudioDeviceDescriptions devices; |
| + RunOnAudioThread(base::Bind(&AudioManager::GetAudioInputDeviceDescriptions, |
| + base::Unretained(audio_manager()), &devices)); |
| + CheckDeviceDescriptions(devices); |
| } |
| // Verify output device enumeration. |
| -TEST_F(AudioAndroidOutputTest, GetAudioOutputDeviceNames) { |
| +TEST_F(AudioAndroidOutputTest, GetAudioOutputDeviceDescriptions) { |
| ABORT_AUDIO_TEST_IF_NOT(audio_manager()->HasAudioOutputDevices()); |
| - AudioDeviceNames devices; |
| - RunOnAudioThread( |
| - base::Bind(&AudioManager::GetAudioOutputDeviceNames, |
| - base::Unretained(audio_manager()), |
| - &devices)); |
| - CheckDeviceNames(devices); |
| + AudioDeviceDescriptions devices; |
| + RunOnAudioThread(base::Bind(&AudioManager::GetAudioOutputDeviceDescriptions, |
| + base::Unretained(audio_manager()), &devices)); |
| + CheckDeviceDescriptions(devices); |
| } |
| // Ensure that a default input stream can be created and closed. |