Index: chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc |
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc |
index 3b98bebd11932001a7cde56bb4609e878a0daac6..1d5b36f2423ea05031db205c258c08757745ad1a 100644 |
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc |
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_apitest_chromeos.cc |
@@ -4,9 +4,9 @@ |
#include <string.h> |
-#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" |
-#include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h" |
-#include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device.h" |
+#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter_interface.h" |
+#include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter_dbus.h" |
+#include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_device_dbus.h" |
#include "chrome/browser/chromeos/extensions/bluetooth_event_router.h" |
#include "chrome/browser/extensions/api/bluetooth/bluetooth_api.h" |
#include "chrome/browser/extensions/extension_apitest.h" |
@@ -15,9 +15,11 @@ |
#include "chrome/browser/extensions/extension_test_message_listener.h" |
#include "chrome/browser/ui/browser.h" |
#include "chromeos/dbus/bluetooth_out_of_band_client.h" |
+#include "chromeos/dbus/bluetooth_out_of_band_pairing_data.h" |
#include "chrome/test/base/ui_test_utils.h" |
#include "testing/gmock/include/gmock/gmock.h" |
+using chromeos::BluetoothAdapterDBus; |
using extensions::Extension; |
namespace utils = extension_function_test_utils; |
@@ -34,14 +36,15 @@ class BluetoothApiTest : public PlatformAppApiTest { |
virtual void SetUpOnMainThread() OVERRIDE { |
// The browser will clean this up when it is torn down |
- mock_adapter_ = new testing::StrictMock<chromeos::MockBluetoothAdapter>( |
- kAdapterAddress, kName); |
+ mock_adapter_ = |
+ new testing::StrictMock<chromeos::MockBluetoothAdapterDBus>( |
+ kAdapterAddress, kName); |
event_router()->SetAdapterForTest(mock_adapter_); |
- device1_.reset(new testing::NiceMock<chromeos::MockBluetoothDevice>( |
+ device1_.reset(new testing::NiceMock<chromeos::MockBluetoothDeviceDBus>( |
mock_adapter_, "d1", "11:12:13:14:15:16", |
true /* paired */, false /* bonded */, true /* connected */)); |
- device2_.reset(new testing::NiceMock<chromeos::MockBluetoothDevice>( |
+ device2_.reset(new testing::NiceMock<chromeos::MockBluetoothDeviceDBus>( |
mock_adapter_, "d2", "21:22:23:24:25:26", |
false /* paired */, true /* bonded */, false /* connected */)); |
} |
@@ -76,9 +79,9 @@ class BluetoothApiTest : public PlatformAppApiTest { |
} |
protected: |
- testing::StrictMock<chromeos::MockBluetoothAdapter>* mock_adapter_; |
- scoped_ptr<testing::NiceMock<chromeos::MockBluetoothDevice> > device1_; |
- scoped_ptr<testing::NiceMock<chromeos::MockBluetoothDevice> > device2_; |
+ testing::StrictMock<chromeos::MockBluetoothAdapterDBus>* mock_adapter_; |
+ scoped_ptr<testing::NiceMock<chromeos::MockBluetoothDeviceDBus> > device1_; |
+ scoped_ptr<testing::NiceMock<chromeos::MockBluetoothDeviceDBus> > device2_; |
chromeos::ExtensionBluetoothEventRouter* event_router() { |
return browser()->profile()->GetExtensionService()-> |
@@ -109,8 +112,8 @@ static bool CallClosure(const base::Closure& callback) { |
} |
static bool CallOutOfBandPairingDataCallback( |
- const chromeos::BluetoothAdapter::BluetoothOutOfBandPairingDataCallback& |
- callback) { |
+ const BluetoothAdapterDBus::BluetoothOutOfBandPairingDataCallback& |
+ callback) { |
callback.Run(GetOutOfBandPairingData()); |
return true; |
} |
@@ -164,7 +167,7 @@ IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetName) { |
} |
IN_PROC_BROWSER_TEST_F(BluetoothApiTest, GetDevices) { |
- chromeos::BluetoothAdapter::ConstDeviceList devices; |
+ chromeos::BluetoothAdapterDBus::ConstDeviceList devices; |
devices.push_back(device1_.get()); |
devices.push_back(device2_.get()); |