Index: chrome/browser/automation/testing_automation_provider.cc |
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
index 47036a383d9ad8c1c5622eaaae314a1f84401187..8c04533a26fe6ddf86c7b9b32fd803b4265d2b3d 100644 |
--- a/chrome/browser/automation/testing_automation_provider.cc |
+++ b/chrome/browser/automation/testing_automation_provider.cc |
@@ -2258,8 +2258,15 @@ void TestingAutomationProvider::PerformActionOnInfobar( |
media_stream_infobar->GetVideoDevices(); |
content::MediaStreamDevices audio_devices = |
media_stream_infobar->GetAudioDevices(); |
- if (video_devices.empty() || audio_devices.empty()) { |
- reply.SendError("No available audio/video devices to autoselect."); |
+ |
phoglund_chromium
2012/11/29 10:11:36
HasVideo() == true -> web page actually requested
|
+ if (media_stream_infobar->HasVideo() && video_devices.empty()) { |
+ reply.SendError("Requested video, but there are no video " |
+ "devices on the system."); |
+ return; |
+ } |
+ if (media_stream_infobar->HasAudio() && audio_devices.empty()) { |
+ reply.SendError("Requested audio, but there are no audio " |
+ "devices on the system."); |
return; |
} |