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

Side by Side Diff: device/bluetooth/device_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/bluetooth/adapter_factory.cc ('k') | device/generic_sensor/sensor_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 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 "device/bluetooth/device.h" 5 #include "device/bluetooth/device.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 device_.AddMockService(std::move(service1)); 65 device_.AddMockService(std::move(service1));
66 device_.AddMockService(std::move(service2)); 66 device_.AddMockService(std::move(service2));
67 67
68 EXPECT_CALL(device_, GetGattServices()) 68 EXPECT_CALL(device_, GetGattServices())
69 .WillRepeatedly( 69 .WillRepeatedly(
70 Invoke(&device_, &device::MockBluetoothDevice::GetMockServices)); 70 Invoke(&device_, &device::MockBluetoothDevice::GetMockServices));
71 71
72 auto connection = base::MakeUnique<NiceMockBluetoothGattConnection>( 72 auto connection = base::MakeUnique<NiceMockBluetoothGattConnection>(
73 adapter_, device_.GetAddress()); 73 adapter_, device_.GetAddress());
74 74
75 Device::Create(adapter_, std::move(connection), mojo::GetProxy(&proxy_)); 75 Device::Create(adapter_, std::move(connection), mojo::MakeRequest(&proxy_));
76 76
77 proxy_.set_connection_error_handler( 77 proxy_.set_connection_error_handler(
78 base::Bind(&BluetoothInterfaceDeviceTest::OnConnectionError, 78 base::Bind(&BluetoothInterfaceDeviceTest::OnConnectionError,
79 weak_factory_.GetWeakPtr())); 79 weak_factory_.GetWeakPtr()));
80 } 80 }
81 81
82 void TearDown() override { 82 void TearDown() override {
83 EXPECT_EQ(expected_success_callback_calls_, actual_success_callback_calls_); 83 EXPECT_EQ(expected_success_callback_calls_, actual_success_callback_calls_);
84 EXPECT_EQ(message_pipe_closed_, expect_device_service_deleted_); 84 EXPECT_EQ(message_pipe_closed_, expect_device_service_deleted_);
85 proxy_.reset(); 85 proxy_.reset();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 // Simulate connection loss. 221 // Simulate connection loss.
222 proxy_->Disconnect(); 222 proxy_->Disconnect();
223 expect_device_service_deleted_ = true; 223 expect_device_service_deleted_ = true;
224 224
225 // Wait for message pipe to process error. 225 // Wait for message pipe to process error.
226 base::RunLoop().RunUntilIdle(); 226 base::RunLoop().RunUntilIdle();
227 } 227 }
228 228
229 } // namespace bluetooth 229 } // namespace bluetooth
OLDNEW
« no previous file with comments | « device/bluetooth/adapter_factory.cc ('k') | device/generic_sensor/sensor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698