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

Unified Diff: extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc

Issue 596603002: Supports multiple active input/output audio nodes in CrasAudioHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor change for code review comments. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
diff --git a/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc b/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
index 034dacc501d93d27a4f776134651b4a04d154700..60cb8903fa33871b1fe588bc3954e447f1a211ba 100644
--- a/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
+++ b/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
@@ -97,8 +97,8 @@ TEST_F(ShellAudioControllerTest, SelectBestDevices) {
all_nodes.push_back(headphone);
all_nodes.push_back(external_mic);
audio_client_->SetAudioNodesAndNotifyObserversForTesting(all_nodes);
- EXPECT_EQ(headphone.id, audio_handler_->GetActiveOutputNode());
- EXPECT_EQ(external_mic.id, audio_handler_->GetActiveInputNode());
+ EXPECT_EQ(headphone.id, audio_handler_->GetPrimaryActiveOutputNode());
+ EXPECT_EQ(external_mic.id, audio_handler_->GetPrimaryActiveInputNode());
// Unplug the headphones and mic and check that we switch to the internal
// devices.
@@ -106,16 +106,16 @@ TEST_F(ShellAudioControllerTest, SelectBestDevices) {
internal_nodes.push_back(internal_speaker);
internal_nodes.push_back(internal_mic);
audio_client_->SetAudioNodesAndNotifyObserversForTesting(internal_nodes);
- EXPECT_EQ(internal_speaker.id, audio_handler_->GetActiveOutputNode());
- EXPECT_EQ(internal_mic.id, audio_handler_->GetActiveInputNode());
+ EXPECT_EQ(internal_speaker.id, audio_handler_->GetPrimaryActiveOutputNode());
+ EXPECT_EQ(internal_mic.id, audio_handler_->GetPrimaryActiveInputNode());
// Switch back to the external devices. Mark the previously-activated internal
// devices as being active so CrasAudioHandler doesn't complain.
SetNodeActive(&all_nodes, internal_speaker.id, true);
SetNodeActive(&all_nodes, internal_mic.id, true);
audio_client_->SetAudioNodesAndNotifyObserversForTesting(all_nodes);
- EXPECT_EQ(headphone.id, audio_handler_->GetActiveOutputNode());
- EXPECT_EQ(external_mic.id, audio_handler_->GetActiveInputNode());
+ EXPECT_EQ(headphone.id, audio_handler_->GetPrimaryActiveOutputNode());
+ EXPECT_EQ(external_mic.id, audio_handler_->GetPrimaryActiveInputNode());
}
// Tests that active audio devices are unmuted and set to 100% volume.

Powered by Google App Engine
This is Rietveld 408576698