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

Side by Side Diff: components/proximity_auth/bluetooth_connection_unittest.cc

Issue 2808353004: bluetooth: Rename Is*Available to Is*Supported (Closed)
Patch Set: Add const Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/proximity_auth/bluetooth_connection.h" 5 #include "components/proximity_auth/bluetooth_connection.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 // The connection disconnects and unregisters as an observer upon destruction. 199 // The connection disconnects and unregisters as an observer upon destruction.
200 EXPECT_CALL(*socket_, Disconnect(_)); 200 EXPECT_CALL(*socket_, Disconnect(_));
201 EXPECT_CALL(*adapter_, RemoveObserver(&connection)); 201 EXPECT_CALL(*adapter_, RemoveObserver(&connection));
202 } 202 }
203 203
204 TEST_F(ProximityAuthBluetoothConnectionTest, Connect_NoBluetoothAdapter) { 204 TEST_F(ProximityAuthBluetoothConnectionTest, Connect_NoBluetoothAdapter) {
205 // Some platforms do not support Bluetooth. This test is only meaningful on 205 // Some platforms do not support Bluetooth. This test is only meaningful on
206 // those platforms. 206 // those platforms.
207 adapter_ = NULL; 207 adapter_ = NULL;
208 if (device::BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) 208 if (device::BluetoothAdapterFactory::IsBluetoothSupported())
209 return; 209 return;
210 210
211 StrictMock<MockBluetoothConnection> connection; 211 StrictMock<MockBluetoothConnection> connection;
212 EXPECT_CALL(connection, SetStatusProxy(_)).Times(0); 212 EXPECT_CALL(connection, SetStatusProxy(_)).Times(0);
213 connection.Connect(); 213 connection.Connect();
214 } 214 }
215 215
216 TEST_F(ProximityAuthBluetoothConnectionTest, Connect_DeviceMissing) { 216 TEST_F(ProximityAuthBluetoothConnectionTest, Connect_DeviceMissing) {
217 StrictMock<MockBluetoothConnection> connection; 217 StrictMock<MockBluetoothConnection> connection;
218 218
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 EXPECT_TRUE(connection.IsConnected()); 480 EXPECT_TRUE(connection.IsConnected());
481 connection.DeviceChanged(adapter_.get(), &device_); 481 connection.DeviceChanged(adapter_.get(), &device_);
482 EXPECT_TRUE(connection.IsConnected()); 482 EXPECT_TRUE(connection.IsConnected());
483 483
484 // The connection disconnects and unregisters as an observer upon destruction. 484 // The connection disconnects and unregisters as an observer upon destruction.
485 EXPECT_CALL(*socket_, Disconnect(_)); 485 EXPECT_CALL(*socket_, Disconnect(_));
486 EXPECT_CALL(*adapter_, RemoveObserver(&connection)); 486 EXPECT_CALL(*adapter_, RemoveObserver(&connection));
487 } 487 }
488 488
489 } // namespace proximity_auth 489 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/bluetooth_connection_finder_unittest.cc ('k') | components/proximity_auth/proximity_monitor_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698