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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h" | 8 #include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h" |
9 #include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h" | 9 #include "chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 EXPECT_CALL(*mock_adapter_, | 169 EXPECT_CALL(*mock_adapter_, |
170 AddPairingDelegate( | 170 AddPairingDelegate( |
171 _, device::BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_HIGH)) | 171 _, device::BluetoothAdapter::PAIRING_DELEGATE_PRIORITY_HIGH)) |
172 .WillOnce(WithoutArgs( | 172 .WillOnce(WithoutArgs( |
173 Invoke(this, &BluetoothPrivateApiTest::DispatchPasskeyPairingEvent))); | 173 Invoke(this, &BluetoothPrivateApiTest::DispatchPasskeyPairingEvent))); |
174 EXPECT_CALL(*mock_device_, ExpectingPasskey()).WillRepeatedly(Return(true)); | 174 EXPECT_CALL(*mock_device_, ExpectingPasskey()).WillRepeatedly(Return(true)); |
175 EXPECT_CALL(*mock_device_, SetPasskey(900531)); | 175 EXPECT_CALL(*mock_device_, SetPasskey(900531)); |
176 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing")) | 176 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/passkey_pairing")) |
177 << message_; | 177 << message_; |
178 } | 178 } |
| 179 |
| 180 IN_PROC_BROWSER_TEST_F(BluetoothPrivateApiTest, GetRSSIForDevice) { |
| 181 EXPECT_CALL(*mock_device_, GetRSSI()).WillOnce(Return(-42)); |
| 182 ASSERT_TRUE(RunComponentExtensionTest("bluetooth_private/get_rssi")) |
| 183 << message_; |
| 184 } |
OLD | NEW |