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

Unified Diff: services/video_capture/fake_device_unittest.cc

Issue 2378943002: Let clients interact with VideoCaptureDeviceClient instead of VideoCaptureDevice (Closed)
Patch Set: Remove method AsClientBuffer() Created 4 years, 2 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: services/video_capture/fake_device_unittest.cc
diff --git a/services/video_capture/fake_device_unittest.cc b/services/video_capture/fake_device_unittest.cc
index 7372eae0b8fcaf2bff752c5a650e32bf5b16e3f0..68f0936ff6ca5ae2ef6e8ebbc1389483c607f98f 100644
--- a/services/video_capture/fake_device_unittest.cc
+++ b/services/video_capture/fake_device_unittest.cc
@@ -5,7 +5,7 @@
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "services/video_capture/fake_device_test.h"
-#include "services/video_capture/mock_video_capture_device_client.h"
+#include "services/video_capture/mock_video_frame_receiver.h"
#include "services/video_capture/public/interfaces/video_capture_device_factory.mojom.h"
#include "services/video_capture/video_capture_service_test.h"
@@ -24,9 +24,9 @@ TEST_F(FakeDeviceTest, FrameCallbacksArrive) {
base::RunLoop wait_loop;
const int kNumFramesToWaitFor = 3;
int num_frames_arrived = 0;
- mojom::VideoCaptureDeviceClientPtr client_proxy;
- MockVideoCaptureDeviceClient client(mojo::GetProxy(&client_proxy));
- EXPECT_CALL(client, OnFrameAvailablePtr(_))
+ mojom::VideoFrameReceiverPtr receiver_proxy;
+ MockVideoFrameReceiver receiver(mojo::GetProxy(&receiver_proxy));
+ EXPECT_CALL(receiver, OnIncomingCapturedVideoFramePtr(_))
.WillRepeatedly(InvokeWithoutArgs(
[&wait_loop, &kNumFramesToWaitFor, &num_frames_arrived]() {
num_frames_arrived += 1;
@@ -38,7 +38,7 @@ TEST_F(FakeDeviceTest, FrameCallbacksArrive) {
fake_device_proxy_->Start(arbitrary_requested_format,
media::RESOLUTION_POLICY_FIXED_RESOLUTION,
media::PowerLineFrequency::FREQUENCY_DEFAULT,
- std::move(client_proxy));
+ std::move(receiver_proxy));
wait_loop.Run();
}

Powered by Google App Engine
This is Rietveld 408576698