Lines Matching refs:adapter_
42 adapter_ = Adapter::Create(); in SetUp()
46 adapter_.reset(); in TearDown()
54 std::unique_ptr<Adapter> adapter_; member in bluetooth::__anon96b87c780111::AdapterTest
63 : adapter_(adapter), in TestObserver()
67 CHECK(adapter_); in TestObserver()
68 adapter_->AddObserver(this); in TestObserver()
72 adapter_->RemoveObserver(this); in ~TestObserver()
90 ASSERT_EQ(adapter_, adapter); in OnAdapterStateChanged()
99 ASSERT_EQ(adapter_, adapter); in OnDeviceConnectionStateChanged()
105 bluetooth::Adapter* adapter_; member in bluetooth::__anon96b87c780111::TestObserver
114 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
117 EXPECT_TRUE(adapter_->IsEnabled()); in TEST_F()
120 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
124 TestObserver observer(adapter_.get()); in TEST_F()
126 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
127 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
130 EXPECT_FALSE(adapter_->Enable(false)); in TEST_F()
131 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
135 EXPECT_TRUE(adapter_->Enable(false)); in TEST_F()
142 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_ON, adapter_->GetState()); in TEST_F()
143 EXPECT_FALSE(adapter_->Enable(false)); in TEST_F()
147 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, adapter_->GetState()); in TEST_F()
154 EXPECT_FALSE(adapter_->Enable(false)); in TEST_F()
158 TestObserver observer(adapter_.get()); in TEST_F()
161 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
162 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
165 EXPECT_FALSE(adapter_->Disable()); in TEST_F()
166 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
175 EXPECT_TRUE(adapter_->Disable()); in TEST_F()
182 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_OFF, adapter_->GetState()); in TEST_F()
183 EXPECT_FALSE(adapter_->Disable()); in TEST_F()
186 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, adapter_->GetState()); in TEST_F()
194 EXPECT_FALSE(adapter_->Disable()); in TEST_F()
209 EXPECT_EQ(bluetooth::Adapter::kDefaultName, adapter_->GetName()); in TEST_F()
214 EXPECT_EQ(kTestAdapterName, adapter_->GetName()); in TEST_F()
221 EXPECT_FALSE(adapter_->SetName(std::string(sizeof(hal_name.name), 'a'))); in TEST_F()
224 EXPECT_FALSE(adapter_->SetName("Test Name")); in TEST_F()
226 EXPECT_TRUE(adapter_->SetName("Test Name")); in TEST_F()
230 EXPECT_EQ(bluetooth::Adapter::kDefaultAddress, adapter_->GetAddress()); in TEST_F()
238 EXPECT_EQ(kTestAdapterAddressOutput, adapter_->GetAddress()); in TEST_F()
242 EXPECT_FALSE(adapter_->IsMultiAdvertisementSupported()); in TEST_F()
249 EXPECT_TRUE(adapter_->IsMultiAdvertisementSupported()); in TEST_F()
253 EXPECT_FALSE(adapter_->IsMultiAdvertisementSupported()); in TEST_F()
258 TestObserver observer(adapter_.get()); in TEST_F()
260 EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()
268 EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()
275 EXPECT_TRUE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()
282 EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()