| Index: device/bluetooth/bluetooth_adapter_android_unittest.cc
|
| diff --git a/device/bluetooth/bluetooth_adapter_android_unittest.cc b/device/bluetooth/bluetooth_adapter_android_unittest.cc
|
| index 1df32a2ecf678423f881d22fd2369f96b048a8f9..c4d5252e339c7a99f97c059bccfed78af6695902 100644
|
| --- a/device/bluetooth/bluetooth_adapter_android_unittest.cc
|
| +++ b/device/bluetooth/bluetooth_adapter_android_unittest.cc
|
| @@ -10,45 +10,16 @@
|
|
|
| class BluetoothAdapterAndroidTest : public testing::Test {
|
| protected:
|
| - void InitWithPermission() {
|
| + BluetoothAdapterAndroidTest() {
|
| adapter_ = BluetoothAdapterAndroid::CreateAdapter().get();
|
| - }
|
| -
|
| - void InitWithoutPermission() {
|
| - adapter_ =
|
| - BluetoothAdapterAndroid::CreateAdapterWithoutPermissionForTesting()
|
| - .get();
|
| }
|
|
|
| scoped_refptr<BluetoothAdapterAndroid> adapter_;
|
| };
|
|
|
| TEST_F(BluetoothAdapterAndroidTest, Construct) {
|
| - InitWithPermission();
|
| - ASSERT_TRUE(adapter_.get());
|
| - EXPECT_TRUE(adapter_->HasBluetoothPermission());
|
| - if (!adapter_->IsPresent()) {
|
| - LOG(WARNING) << "Bluetooth adapter not present; skipping unit test.";
|
| - return;
|
| - }
|
| - EXPECT_GT(adapter_->GetAddress().length(), 0u);
|
| - EXPECT_GT(adapter_->GetName().length(), 0u);
|
| - EXPECT_TRUE(adapter_->IsPresent());
|
| - EXPECT_TRUE(adapter_->IsPowered());
|
| - EXPECT_FALSE(adapter_->IsDiscoverable());
|
| - EXPECT_FALSE(adapter_->IsDiscovering());
|
| -}
|
| -
|
| -TEST_F(BluetoothAdapterAndroidTest, ConstructNoPermision) {
|
| - InitWithoutPermission();
|
| ASSERT_TRUE(adapter_.get());
|
| EXPECT_FALSE(adapter_->HasBluetoothPermission());
|
| - EXPECT_EQ(adapter_->GetAddress().length(), 0u);
|
| - EXPECT_EQ(adapter_->GetName().length(), 0u);
|
| - EXPECT_FALSE(adapter_->IsPresent());
|
| - EXPECT_FALSE(adapter_->IsPowered());
|
| - EXPECT_FALSE(adapter_->IsDiscoverable());
|
| - EXPECT_FALSE(adapter_->IsDiscovering());
|
| }
|
|
|
| } // namespace device
|
|
|