Lines Matching refs:adapter_
42 adapter_ = Adapter::Create(); in SetUp()
46 adapter_.reset(); in TearDown()
54 std::unique_ptr<Adapter> adapter_; member in bluetooth::__anon8aac85840111::AdapterTest
63 : adapter_(adapter), in TestObserver()
67 CHECK(adapter_); in TestObserver()
68 adapter_->AddObserver(this); in TestObserver()
71 ~TestObserver() override { adapter_->RemoveObserver(this); } in ~TestObserver()
88 ASSERT_EQ(adapter_, adapter); in OnAdapterStateChanged()
96 ASSERT_EQ(adapter_, adapter); in OnDeviceConnectionStateChanged()
102 bluetooth::Adapter* adapter_; member in bluetooth::__anon8aac85840111::TestObserver
111 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
114 EXPECT_TRUE(adapter_->IsEnabled()); in TEST_F()
117 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
121 TestObserver observer(adapter_.get()); in TEST_F()
123 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
124 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
127 EXPECT_FALSE(adapter_->Enable()); in TEST_F()
128 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
132 EXPECT_TRUE(adapter_->Enable()); in TEST_F()
139 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_ON, adapter_->GetState()); in TEST_F()
140 EXPECT_FALSE(adapter_->Enable()); in TEST_F()
144 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, adapter_->GetState()); in TEST_F()
151 EXPECT_FALSE(adapter_->Enable()); in TEST_F()
155 TestObserver observer(adapter_.get()); in TEST_F()
158 EXPECT_FALSE(adapter_->IsEnabled()); in TEST_F()
159 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
162 EXPECT_FALSE(adapter_->Disable()); in TEST_F()
163 EXPECT_EQ(bluetooth::ADAPTER_STATE_OFF, adapter_->GetState()); in TEST_F()
172 EXPECT_TRUE(adapter_->Disable()); in TEST_F()
179 EXPECT_EQ(bluetooth::ADAPTER_STATE_TURNING_OFF, adapter_->GetState()); in TEST_F()
180 EXPECT_FALSE(adapter_->Disable()); in TEST_F()
183 EXPECT_EQ(bluetooth::ADAPTER_STATE_ON, adapter_->GetState()); in TEST_F()
191 EXPECT_FALSE(adapter_->Disable()); in TEST_F()
206 EXPECT_EQ(bluetooth::Adapter::kDefaultName, adapter_->GetName()); in TEST_F()
211 EXPECT_EQ(kTestAdapterName, adapter_->GetName()); in TEST_F()
218 EXPECT_FALSE(adapter_->SetName(std::string(sizeof(hal_name.name), 'a'))); in TEST_F()
221 EXPECT_FALSE(adapter_->SetName("Test Name")); in TEST_F()
223 EXPECT_TRUE(adapter_->SetName("Test Name")); in TEST_F()
227 EXPECT_EQ(bluetooth::Adapter::kDefaultAddress, adapter_->GetAddress()); in TEST_F()
233 EXPECT_EQ(kTestAdapterAddressOutput, adapter_->GetAddress()); in TEST_F()
237 EXPECT_FALSE(adapter_->IsMultiAdvertisementSupported()); in TEST_F()
244 EXPECT_TRUE(adapter_->IsMultiAdvertisementSupported()); in TEST_F()
248 EXPECT_FALSE(adapter_->IsMultiAdvertisementSupported()); in TEST_F()
253 TestObserver observer(adapter_.get()); in TEST_F()
255 EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()
263 EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()
270 EXPECT_TRUE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()
277 EXPECT_FALSE(adapter_->IsDeviceConnected(kDeviceAddr)); in TEST_F()