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

Side by Side Diff: device/vr/vr_device_manager_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « device/usb/mojo/device_manager_impl_unittest.cc ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "device/vr/vr_device_manager.h" 5 #include "device/vr/vr_device_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 VRDeviceManagerTest::~VRDeviceManagerTest() {} 53 VRDeviceManagerTest::~VRDeviceManagerTest() {}
54 54
55 void VRDeviceManagerTest::SetUp() { 55 void VRDeviceManagerTest::SetUp() {
56 provider_ = new FakeVRDeviceProvider(); 56 provider_ = new FakeVRDeviceProvider();
57 device_manager_.reset(new VRDeviceManager(base::WrapUnique(provider_))); 57 device_manager_.reset(new VRDeviceManager(base::WrapUnique(provider_)));
58 } 58 }
59 59
60 std::unique_ptr<VRServiceImpl> VRDeviceManagerTest::BindService() { 60 std::unique_ptr<VRServiceImpl> VRDeviceManagerTest::BindService() {
61 mojom::VRServiceClientPtr proxy; 61 mojom::VRServiceClientPtr proxy;
62 FakeVRServiceClient client(mojo::GetProxy(&proxy)); 62 FakeVRServiceClient client(mojo::MakeRequest(&proxy));
63 auto service = base::WrapUnique(new VRServiceImpl()); 63 auto service = base::WrapUnique(new VRServiceImpl());
64 service->SetClient(std::move(proxy), 64 service->SetClient(std::move(proxy),
65 base::Bind(&VRDeviceManagerTest::onDisplaySynced, 65 base::Bind(&VRDeviceManagerTest::onDisplaySynced,
66 base::Unretained(this))); 66 base::Unretained(this)));
67 return service; 67 return service;
68 } 68 }
69 69
70 TEST_F(VRDeviceManagerTest, InitializationTest) { 70 TEST_F(VRDeviceManagerTest, InitializationTest) {
71 EXPECT_FALSE(provider_->IsInitialized()); 71 EXPECT_FALSE(provider_->IsInitialized());
72 72
(...skipping 30 matching lines...) Expand all
103 provider_->AddDevice(base::WrapUnique(device2)); 103 provider_->AddDevice(base::WrapUnique(device2));
104 success = device_manager_->GetVRDevices(service.get()); 104 success = device_manager_->GetVRDevices(service.get());
105 EXPECT_TRUE(success); 105 EXPECT_TRUE(success);
106 106
107 // Querying the WebVRDevice index should return the correct device. 107 // Querying the WebVRDevice index should return the correct device.
108 EXPECT_EQ(device1, GetDevice(device1->id())); 108 EXPECT_EQ(device1, GetDevice(device1->id()));
109 EXPECT_EQ(device2, GetDevice(device2->id())); 109 EXPECT_EQ(device2, GetDevice(device2->id()));
110 } 110 }
111 111
112 } // namespace device 112 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/mojo/device_manager_impl_unittest.cc ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698