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

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

Issue 2607203002: [Mojo Video Capture] Retire buffers when Android Chromium goes to the background (Closed)
Patch Set: mcasas comments Created 3 years, 10 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/video_capture_device_client_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_device_client_unittest.cc b/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
index 0276d14498308dbd97533a143f02e5e4dafc9706..9e2fcc47556ac318b12af140fc9d4bb388d41403 100644
--- a/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
@@ -42,7 +42,7 @@ class MockVideoCaptureController : public VideoCaptureController {
MOCK_METHOD1(MockOnIncomingCapturedVideoFrame, void(const gfx::Size&));
MOCK_METHOD0(OnError, void());
MOCK_METHOD1(OnLog, void(const std::string& message));
- MOCK_METHOD1(OnBufferDestroyed, void(int buffer_id_to_drop));
+ MOCK_METHOD1(OnBufferRetired, void(int buffer_id));
void OnIncomingCapturedVideoFrame(
media::VideoCaptureDevice::Client::Buffer buffer,
@@ -56,11 +56,11 @@ std::unique_ptr<media::VideoCaptureJpegDecoder> CreateGpuJpegDecoder(
return base::MakeUnique<content::VideoCaptureGpuJpegDecoder>(decode_done_cb);
}
-// Note that this test does not exercise the class VideoCaptureDeviceClient
-// in isolation. The "unit under test" is an instance of
-// VideoCaptureDeviceClient with some context that is specific to
-// renderer_host/media, and therefore this test must live here and not in
-// media/capture/video.
+// Test fixture for testing a unit consisting of an instance of
+// VideoCaptureDeviceClient connected to a partly-mocked instance of
+// VideoCaptureController, and an instance of VideoCaptureBufferPoolImpl
+// as well as related threading glue that replicates how it is used in
+// production.
class VideoCaptureDeviceClientTest : public ::testing::Test {
public:
VideoCaptureDeviceClientTest()

Powered by Google App Engine
This is Rietveld 408576698