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

Side by Side Diff: services/video_capture/test/service_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "services/video_capture/public/interfaces/device_factory.mojom.h" 7 #include "services/video_capture/public/interfaces/device_factory.mojom.h"
8 #include "services/video_capture/test/service_test.h" 8 #include "services/video_capture/test/service_test.h"
9 9
10 using testing::Exactly; 10 using testing::Exactly;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 TEST_F(ServiceTest, ErrorCodeOnCreateDeviceForInvalidDescriptor) { 56 TEST_F(ServiceTest, ErrorCodeOnCreateDeviceForInvalidDescriptor) {
57 const std::string invalid_device_id = "invalid"; 57 const std::string invalid_device_id = "invalid";
58 base::RunLoop wait_loop; 58 base::RunLoop wait_loop;
59 mojom::DevicePtr fake_device_proxy; 59 mojom::DevicePtr fake_device_proxy;
60 MockCreateDeviceProxyCallback create_device_proxy_callback; 60 MockCreateDeviceProxyCallback create_device_proxy_callback;
61 EXPECT_CALL(create_device_proxy_callback, 61 EXPECT_CALL(create_device_proxy_callback,
62 Run(mojom::DeviceAccessResultCode::ERROR_DEVICE_NOT_FOUND)) 62 Run(mojom::DeviceAccessResultCode::ERROR_DEVICE_NOT_FOUND))
63 .Times(1) 63 .Times(1)
64 .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); })); 64 .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); }));
65 factory_->CreateDevice( 65 factory_->CreateDevice(
66 invalid_device_id, mojo::GetProxy(&fake_device_proxy), 66 invalid_device_id, mojo::MakeRequest(&fake_device_proxy),
67 base::Bind(&MockCreateDeviceProxyCallback::Run, 67 base::Bind(&MockCreateDeviceProxyCallback::Run,
68 base::Unretained(&create_device_proxy_callback))); 68 base::Unretained(&create_device_proxy_callback)));
69 wait_loop.Run(); 69 wait_loop.Run();
70 } 70 }
71 71
72 } // namespace video_capture 72 } // namespace video_capture
OLDNEW
« no previous file with comments | « services/video_capture/test/service_test.cc ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698