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

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

Issue 7948004: Removing singelton property of MediaStreamManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.cc ('k') | content/browser/resource_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index 1a4b7a06c68574faeb1ba26c47c9a04c47130d44..a93f1839f7955395c9c29339b582940670039f29 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -209,8 +209,6 @@ TEST_F(VideoCaptureManagerTest, OpenTwo) {
listener_->devices_.begin();
int video_session_id_first = vcm_->Open(*it);
-
- // This should trigger an error callback with error code 'kDeviceAlreadyInUse'
++it;
int video_session_id_second = vcm_->Open(*it);
@@ -275,4 +273,33 @@ TEST_F(VideoCaptureManagerTest, StartUsingId) {
vcm_->Unregister();
}
+// TODO(mflodman) Remove test case below when shut-down bug is resolved, this is
+// only to verify this temporary solution is ok in regards to the
+// VideoCaptureManager.
+// Open the devices and delete manager.
+TEST_F(VideoCaptureManagerTest, DeleteManager) {
+ InSequence s;
+ EXPECT_CALL(*listener_, DevicesEnumerated(_))
+ .Times(1);
+ EXPECT_CALL(*listener_, Opened(media_stream::kVideoCapture, _))
+ .Times(2);
+
+ vcm_->EnumerateDevices();
+
+ // Wait to get device callback...
+ SyncWithVideoCaptureManagerThread();
+
+ media_stream::StreamDeviceInfoArray::iterator it =
+ listener_->devices_.begin();
+ vcm_->Open(*it);
+ ++it;
+ vcm_->Open(*it);
+
+ // Wait to check callbacks before removing the listener
+ SyncWithVideoCaptureManagerThread();
+
+ // Delete the manager.
+ vcm_.reset();
+}
+
} // namespace
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.cc ('k') | content/browser/resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698