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

Unified Diff: content/browser/renderer_host/media/audio_renderer_host_unittest.cc

Issue 1769933002: Looking up device id by session id for AudioRendererMixerInput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: content/browser/renderer_host/media/audio_renderer_host_unittest.cc
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 5cbf383ebfbd9b1211b57b15db1f84718330c2ab..4dbec2d58b561ff2ed2175324aa056855d0f2377 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -74,10 +74,11 @@ class MockAudioRendererHost : public AudioRendererHost {
shared_memory_length_(0) {}
// A list of mock methods.
- MOCK_METHOD3(OnDeviceAuthorized,
+ MOCK_METHOD4(OnDeviceAuthorized,
void(int stream_id,
media::OutputDeviceStatus device_status,
- const media::AudioParameters& output_params));
+ const media::AudioParameters& output_params,
+ const std::string& matched_device_id));
MOCK_METHOD2(OnStreamCreated, void(int stream_id, int length));
MOCK_METHOD1(OnStreamPlaying, void(int stream_id));
MOCK_METHOD1(OnStreamPaused, void(int stream_id));
@@ -115,8 +116,10 @@ class MockAudioRendererHost : public AudioRendererHost {
void OnNotifyDeviceAuthorized(int stream_id,
media::OutputDeviceStatus device_status,
- const media::AudioParameters& output_params) {
- OnDeviceAuthorized(stream_id, device_status, output_params);
+ const media::AudioParameters& output_params,
+ const std::string& matched_device_id) {
+ OnDeviceAuthorized(stream_id, device_status, output_params,
+ matched_device_id);
}
void OnNotifyStreamCreated(
@@ -232,7 +235,7 @@ class AudioRendererHostTest : public testing::Test {
: media::OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND;
EXPECT_CALL(*host_.get(),
- OnDeviceAuthorized(kStreamId, expected_device_status, _));
+ OnDeviceAuthorized(kStreamId, expected_device_status, _, _));
if (expected_device_status == media::OUTPUT_DEVICE_STATUS_OK) {
EXPECT_CALL(*host_.get(), OnStreamCreated(kStreamId, _));

Powered by Google App Engine
This is Rietveld 408576698