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

Side by Side Diff: device/bluetooth/test/bluetooth_test.cc

Issue 1412023002: bluetooth: mac: Only test Low Energy discovery sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@btm-key-strings-
Patch Set: Created 5 years, 2 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
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | no next file » | 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/bluetooth/test/bluetooth_test.h" 5 #include "device/bluetooth/test/bluetooth_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "device/bluetooth/bluetooth_adapter.h" 10 #include "device/bluetooth/bluetooth_adapter.h"
(...skipping 12 matching lines...) Expand all
23 const std::string BluetoothTestBase::kTestUUIDGenericAccess = "1800"; 23 const std::string BluetoothTestBase::kTestUUIDGenericAccess = "1800";
24 const std::string BluetoothTestBase::kTestUUIDGenericAttribute = "1801"; 24 const std::string BluetoothTestBase::kTestUUIDGenericAttribute = "1801";
25 const std::string BluetoothTestBase::kTestUUIDImmediateAlert = "1802"; 25 const std::string BluetoothTestBase::kTestUUIDImmediateAlert = "1802";
26 const std::string BluetoothTestBase::kTestUUIDLinkLoss = "1803"; 26 const std::string BluetoothTestBase::kTestUUIDLinkLoss = "1803";
27 27
28 BluetoothTestBase::BluetoothTestBase() : weak_factory_(this) {} 28 BluetoothTestBase::BluetoothTestBase() : weak_factory_(this) {}
29 29
30 BluetoothTestBase::~BluetoothTestBase() { 30 BluetoothTestBase::~BluetoothTestBase() {
31 } 31 }
32 32
33 void BluetoothTestBase::StartDiscoverySession() { 33 void BluetoothTestBase::StartLowEnergyDiscoverySession() {
34 adapter_->StartDiscoverySession(GetDiscoverySessionCallback(), 34 adapter_->StartDiscoverySessionWithFilter(
Nico 2015/10/18 02:43:32 Do you want to test both session times at some poi
scheib 2015/10/18 04:21:13 OK, added blocking feature issue: https://code.goo
35 GetErrorCallback()); 35 make_scoped_ptr(new BluetoothDiscoveryFilter(
36 BluetoothDiscoveryFilter::Transport::TRANSPORT_LE)),
37 GetDiscoverySessionCallback(), GetErrorCallback());
36 base::RunLoop().RunUntilIdle(); 38 base::RunLoop().RunUntilIdle();
37 } 39 }
38 40
39 BluetoothDevice* BluetoothTestBase::DiscoverLowEnergyDevice( 41 BluetoothDevice* BluetoothTestBase::DiscoverLowEnergyDevice(
40 int device_ordinal) { 42 int device_ordinal) {
41 NOTIMPLEMENTED(); 43 NOTIMPLEMENTED();
42 return nullptr; 44 return nullptr;
43 } 45 }
44 46
45 void BluetoothTestBase::DeleteDevice(BluetoothDevice* device) { 47 void BluetoothTestBase::DeleteDevice(BluetoothDevice* device) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void BluetoothTestBase::ResetEventCounts() { 104 void BluetoothTestBase::ResetEventCounts() {
103 last_connect_error_code_ = BluetoothDevice::ERROR_UNKNOWN; 105 last_connect_error_code_ = BluetoothDevice::ERROR_UNKNOWN;
104 callback_count_ = 0; 106 callback_count_ = 0;
105 error_callback_count_ = 0; 107 error_callback_count_ = 0;
106 gatt_connection_attempts_ = 0; 108 gatt_connection_attempts_ = 0;
107 gatt_disconnection_attempts_ = 0; 109 gatt_disconnection_attempts_ = 0;
108 gatt_discovery_attempts_ = 0; 110 gatt_discovery_attempts_ = 0;
109 } 111 }
110 112
111 } // namespace device 113 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/bluetooth_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698