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

Unified Diff: services/video_capture/service_unittest.cc

Issue 2502483003: [Mojo Video Capture] Cleanup naming of classes/files in services/video_capture (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « services/video_capture/service_test.cc ('k') | services/video_capture/video_capture_device_proxy_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/service_unittest.cc
diff --git a/services/video_capture/video_capture_service_unittest.cc b/services/video_capture/service_unittest.cc
similarity index 83%
rename from services/video_capture/video_capture_service_unittest.cc
rename to services/video_capture/service_unittest.cc
index 4b1c7029d669bdbae95c95f2cc66733b312ac08e..dd5e6327c36774ba05f8341f51b58474195b71de 100644
--- a/services/video_capture/video_capture_service_unittest.cc
+++ b/services/video_capture/service_unittest.cc
@@ -4,8 +4,8 @@
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
-#include "services/video_capture/public/interfaces/video_capture_device_factory.mojom.h"
-#include "services/video_capture/video_capture_service_test.h"
+#include "services/video_capture/public/interfaces/device_factory.mojom.h"
+#include "services/video_capture/service_test.h"
using testing::Exactly;
using testing::_;
@@ -21,7 +21,7 @@ class MockCreateDeviceProxyCallback {
// Tests that an answer arrives from the service when calling
// EnumerateDeviceDescriptors().
-TEST_F(VideoCaptureServiceTest, EnumerateDeviceDescriptorsCallbackArrives) {
+TEST_F(ServiceTest, EnumerateDeviceDescriptorsCallbackArrives) {
base::RunLoop wait_loop;
EXPECT_CALL(descriptor_receiver_, OnEnumerateDeviceDescriptorsCallback(_))
.Times(Exactly(1))
@@ -33,7 +33,7 @@ TEST_F(VideoCaptureServiceTest, EnumerateDeviceDescriptorsCallbackArrives) {
wait_loop.Run();
}
-TEST_F(VideoCaptureServiceTest, FakeDeviceFactoryEnumeratesOneDevice) {
+TEST_F(ServiceTest, FakeDeviceFactoryEnumeratesOneDevice) {
base::RunLoop wait_loop;
size_t num_devices_enumerated = 0;
EXPECT_CALL(descriptor_receiver_, OnEnumerateDeviceDescriptorsCallback(_))
@@ -53,16 +53,16 @@ TEST_F(VideoCaptureServiceTest, FakeDeviceFactoryEnumeratesOneDevice) {
// Tests that VideoCaptureDeviceFactory::CreateDeviceProxy() returns an error
// code when trying to create a device for an invalid descriptor.
-TEST_F(VideoCaptureServiceTest, ErrorCodeOnCreateDeviceForInvalidDescriptor) {
+TEST_F(ServiceTest, ErrorCodeOnCreateDeviceForInvalidDescriptor) {
const std::string invalid_device_id = "invalid";
base::RunLoop wait_loop;
- mojom::VideoCaptureDeviceProxyPtr fake_device_proxy;
+ mojom::DevicePtr fake_device_proxy;
MockCreateDeviceProxyCallback create_device_proxy_callback;
EXPECT_CALL(create_device_proxy_callback,
Run(mojom::DeviceAccessResultCode::ERROR_DEVICE_NOT_FOUND))
.Times(1)
.WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
- factory_->CreateDeviceProxy(
+ factory_->CreateDevice(
invalid_device_id, mojo::GetProxy(&fake_device_proxy),
base::Bind(&MockCreateDeviceProxyCallback::Run,
base::Unretained(&create_device_proxy_callback)));
« no previous file with comments | « services/video_capture/service_test.cc ('k') | services/video_capture/video_capture_device_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698