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

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

Issue 2721113002: getUserMedia: handle the device starting status report. (Closed)
Patch Set: address nits Created 3 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/media_stream_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index c71b1a47ded4f6b7b8ae06bac32c73e45c89ab35..d4a940e09d994e9c95e94818dd08f27d1aba11f1 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -122,6 +122,10 @@ class MockMediaStreamDispatcherHost : public MediaStreamDispatcherHost,
render_frame_id, page_request_id, device_id, type, security_origin);
}
+ void OnStreamStarted(const std::string label) {
+ MediaStreamDispatcherHost::OnStreamStarted(label);
+ }
+
std::string label_;
StreamDeviceInfoArray audio_devices_;
StreamDeviceInfoArray video_devices_;
@@ -164,6 +168,9 @@ class MockMediaStreamDispatcherHost : public MediaStreamDispatcherHost,
StreamDeviceInfoArray video_device_list) {
OnStreamGenerated(current_ipc_->routing_id(), request_id,
audio_device_list.size(), video_device_list.size());
+ // Simulate the stream started event back to host for UI testing.
+ OnStreamStarted(label);
+
// Notify that the event have occurred.
base::Closure quit_closure = quit_closures_.front();
quit_closures_.pop();

Powered by Google App Engine
This is Rietveld 408576698