Commit aff7677a authored by warx's avatar warx Committed by Commit bot

Fix audio_manager_unittest should update with AudioDevice display_name

In later patch of https://codereview.chromium.org/2079843003/, I update the code to display AudioDevice display_name. But I forget to update the unittest. Since try server is not running in USE_CRAS, it is not detected.

BUG=628342
TEST=run in USE_CRAS building condition, it returns to work fine.

Review-Url: https://codereview.chromium.org/2150983003
Cr-Commit-Position: refs/heads/master@{#405579}
parent 71de1748
...@@ -379,9 +379,12 @@ TEST_F(AudioManagerTest, EnumerateInputDevicesCras) { ...@@ -379,9 +379,12 @@ TEST_F(AudioManagerTest, EnumerateInputDevicesCras) {
// Setup expectation with physical devices. // Setup expectation with physical devices.
std::map<uint64_t, std::string> expectation; std::map<uint64_t, std::string> expectation;
expectation[kJabraMic1.id] = kJabraMic1.device_name; expectation[kJabraMic1.id] =
expectation[kJabraMic2.id] = kJabraMic2.device_name; cras_audio_handler_->GetDeviceFromId(kJabraMic1.id)->display_name;
expectation[kUSBCameraMic.id] = kUSBCameraMic.device_name; expectation[kJabraMic2.id] =
cras_audio_handler_->GetDeviceFromId(kJabraMic2.id)->display_name;
expectation[kUSBCameraMic.id] =
cras_audio_handler_->GetDeviceFromId(kUSBCameraMic.id)->display_name;
DVLOG(2) << "Testing AudioManagerCras."; DVLOG(2) << "Testing AudioManagerCras.";
CreateAudioManagerForTesting<AudioManagerCras>(); CreateAudioManagerForTesting<AudioManagerCras>();
...@@ -405,8 +408,10 @@ TEST_F(AudioManagerTest, EnumerateOutputDevicesCras) { ...@@ -405,8 +408,10 @@ TEST_F(AudioManagerTest, EnumerateOutputDevicesCras) {
// Setup expectation with physical devices. // Setup expectation with physical devices.
std::map<uint64_t, std::string> expectation; std::map<uint64_t, std::string> expectation;
expectation[kHDMIOutput.id] = kHDMIOutput.device_name; expectation[kHDMIOutput.id] =
expectation[kJabraSpeaker1.id] = kJabraSpeaker1.device_name; cras_audio_handler_->GetDeviceFromId(kHDMIOutput.id)->display_name;
expectation[kJabraSpeaker1.id] =
cras_audio_handler_->GetDeviceFromId(kJabraSpeaker1.id)->display_name;
DVLOG(2) << "Testing AudioManagerCras."; DVLOG(2) << "Testing AudioManagerCras.";
CreateAudioManagerForTesting<AudioManagerCras>(); CreateAudioManagerForTesting<AudioManagerCras>();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment