OLD | NEW |
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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
7 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 7 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
8 #include "device/bluetooth/test/mock_bluetooth_device.h" | 8 #include "device/bluetooth/test/mock_bluetooth_device.h" |
9 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" | 9 #include "device/bluetooth/test/mock_bluetooth_gatt_characteristic.h" |
10 #include "device/bluetooth/test/mock_bluetooth_gatt_connection.h" | 10 #include "device/bluetooth/test/mock_bluetooth_gatt_connection.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const uint8 kTestDescriptorDefaultValue0[] = {0x01, 0x02, 0x03}; | 86 const uint8 kTestDescriptorDefaultValue0[] = {0x01, 0x02, 0x03}; |
87 | 87 |
88 const char kTestDescriptorId1[] = "desc_id1"; | 88 const char kTestDescriptorId1[] = "desc_id1"; |
89 const char kTestDescriptorUuid1[] = "1222"; | 89 const char kTestDescriptorUuid1[] = "1222"; |
90 const uint8 kTestDescriptorDefaultValue1[] = {0x04, 0x05}; | 90 const uint8 kTestDescriptorDefaultValue1[] = {0x04, 0x05}; |
91 | 91 |
92 class BluetoothLowEnergyApiTest : public ExtensionApiTest { | 92 class BluetoothLowEnergyApiTest : public ExtensionApiTest { |
93 public: | 93 public: |
94 BluetoothLowEnergyApiTest() {} | 94 BluetoothLowEnergyApiTest() {} |
95 | 95 |
96 virtual ~BluetoothLowEnergyApiTest() {} | 96 ~BluetoothLowEnergyApiTest() override {} |
97 | 97 |
98 void SetUpOnMainThread() override { | 98 void SetUpOnMainThread() override { |
99 ExtensionApiTest::SetUpOnMainThread(); | 99 ExtensionApiTest::SetUpOnMainThread(); |
100 empty_extension_ = extensions::test_util::CreateEmptyExtension(); | 100 empty_extension_ = extensions::test_util::CreateEmptyExtension(); |
101 SetUpMocks(); | 101 SetUpMocks(); |
102 } | 102 } |
103 | 103 |
104 void TearDownOnMainThread() override { | 104 void TearDownOnMainThread() override { |
105 EXPECT_CALL(*mock_adapter_, RemoveObserver(_)); | 105 EXPECT_CALL(*mock_adapter_, RemoveObserver(_)); |
106 } | 106 } |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 event_router()->GattCharacteristicRemoved(mock_adapter_, chrc2_.get()); | 1314 event_router()->GattCharacteristicRemoved(mock_adapter_, chrc2_.get()); |
1315 event_router()->GattCharacteristicRemoved(mock_adapter_, chrc1_.get()); | 1315 event_router()->GattCharacteristicRemoved(mock_adapter_, chrc1_.get()); |
1316 event_router()->GattCharacteristicRemoved(mock_adapter_, chrc0_.get()); | 1316 event_router()->GattCharacteristicRemoved(mock_adapter_, chrc0_.get()); |
1317 event_router()->GattServiceRemoved( | 1317 event_router()->GattServiceRemoved( |
1318 mock_adapter_, device0_.get(), service1_.get()); | 1318 mock_adapter_, device0_.get(), service1_.get()); |
1319 event_router()->GattServiceRemoved( | 1319 event_router()->GattServiceRemoved( |
1320 mock_adapter_, device0_.get(), service0_.get()); | 1320 mock_adapter_, device0_.get(), service0_.get()); |
1321 } | 1321 } |
1322 | 1322 |
1323 } // namespace | 1323 } // namespace |
OLD | NEW |