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

Unified Diff: content/renderer/media/video_capture_impl_manager_unittest.cc

Issue 2763743002: Android: not to pause screen capture when Chrome is put to background (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
« no previous file with comments | « content/renderer/media/video_capture_impl_manager.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl_manager_unittest.cc
diff --git a/content/renderer/media/video_capture_impl_manager_unittest.cc b/content/renderer/media/video_capture_impl_manager_unittest.cc
index 817b228ad33055b38ff9d42d4a7bf606c1aa091a..1f339922136ca99a446a9c0231c5b969433edceb 100644
--- a/content/renderer/media/video_capture_impl_manager_unittest.cc
+++ b/content/renderer/media/video_capture_impl_manager_unittest.cc
@@ -12,6 +12,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "content/child/child_process.h"
+#include "content/common/media/media_stream_options.h"
#include "content/common/video_capture.mojom.h"
#include "content/renderer/media/video_capture_impl.h"
#include "content/renderer/media/video_capture_impl_manager.h"
@@ -228,9 +229,13 @@ TEST_F(VideoCaptureImplManagerTest, NoLeak) {
TEST_F(VideoCaptureImplManagerTest, SuspendAndResumeSessions) {
std::array<base::Closure, kNumClients> release_callbacks;
+ StreamDeviceInfoArray video_device_array;
for (size_t i = 0; i < kNumClients; ++i) {
release_callbacks[i] =
manager_->UseDevice(static_cast<media::VideoCaptureSessionId>(i));
+ StreamDeviceInfo video_device_info;
+ video_device_info.session_id = static_cast<media::VideoCaptureSessionId>(i);
+ video_device_array.push_back(video_device_info);
}
std::array<base::Closure, kNumClients> stop_callbacks =
StartCaptureForAllClients(false);
@@ -244,7 +249,7 @@ TEST_F(VideoCaptureImplManagerTest, SuspendAndResumeSessions) {
EXPECT_CALL(*this, OnPaused(1)).Times(1).RetiresOnSaturation();
EXPECT_CALL(*this, OnPaused(2)).WillOnce(RunClosure(quit_closure))
.RetiresOnSaturation();
- manager_->SuspendDevices(true);
+ manager_->SuspendDevices(video_device_array, true);
run_loop.Run();
}
@@ -256,7 +261,7 @@ TEST_F(VideoCaptureImplManagerTest, SuspendAndResumeSessions) {
EXPECT_CALL(*this, OnResumed(1)).Times(1).RetiresOnSaturation();
EXPECT_CALL(*this, OnResumed(2)).WillOnce(RunClosure(quit_closure))
.RetiresOnSaturation();
- manager_->SuspendDevices(false);
+ manager_->SuspendDevices(video_device_array, false);
run_loop.Run();
}
@@ -279,7 +284,7 @@ TEST_F(VideoCaptureImplManagerTest, SuspendAndResumeSessions) {
EXPECT_CALL(*this, OnPaused(1)).Times(1).RetiresOnSaturation();
EXPECT_CALL(*this, OnPaused(2)).WillOnce(RunClosure(quit_closure))
.RetiresOnSaturation();
- manager_->SuspendDevices(true);
+ manager_->SuspendDevices(video_device_array, true);
run_loop.Run();
}
@@ -298,7 +303,7 @@ TEST_F(VideoCaptureImplManagerTest, SuspendAndResumeSessions) {
EXPECT_CALL(*this, OnResumed(1)).Times(1).RetiresOnSaturation();
EXPECT_CALL(*this, OnResumed(2)).WillOnce(RunClosure(quit_closure))
.RetiresOnSaturation();
- manager_->SuspendDevices(false);
+ manager_->SuspendDevices(video_device_array, false);
run_loop.Run();
}
« no previous file with comments | « content/renderer/media/video_capture_impl_manager.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698