src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac/sim/test/assoc_test.cc
TEST_F(AssocTest, ApIgnoredRequest) {
  // Create our device instance
  Init();

  // Start up fake APs
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  ap.EnableBeacon(zx::msec(100));
  ap.SetAssocHandling(simulation::FakeAp::ASSOC_IGNORED);
  aps_.push_back(&ap);

  context_.expected_results.push_front(WLAN_ASSOC_RESULT_REFUSED_REASON_UNSPECIFIED);

  ScheduleAssocReq(zx::msec(10));

  env_->Run();

  // Make sure no responses were sent back from the fake AP
  EXPECT_EQ(assoc_responses_.size(), 0U);

  // But we still got our response from the driver
  EXPECT_EQ(context_.assoc_resp_count, 1U);
}
// Verify that if an AP does not respond to an association response we return a failure
Verify that if an AP does not respond to an association response we return a failure
Verify that if an AP does not respond to an association response we return a failure
TEST_F(AssocTest, ApIgnoredRequest) {
  Init();
  simulation::FakeAp ap(env_.get(), kDefaultBssid, kDefaultSsid, kDefaultChannel);
  ap.EnableBeacon(zx::msec(100));
  ap.SetAssocHandling(simulation::FakeAp::ASSOC_IGNORED);
  aps_.push_back(&ap);
  context_.expected_results.push_front(WLAN_ASSOC_RESULT_REFUSED_REASON_UNSPECIFIED);
  ScheduleAssocReq(zx::msec(10));
  env_->Run();
  EXPECT_EQ(assoc_responses_.size(), 0U);
  EXPECT_EQ(context_.assoc_resp_count, 1U);
}
TEST_F ( AssocTest , ApIgnoredRequest ) { Init ( ) ; simulation :: FakeAp ap ( env_ . get ( ) , kDefaultBssid , kDefaultSsid , kDefaultChannel ) ; ap . EnableBeacon ( zx :: msec ( 100 ) ) ; ap . SetAssocHandling ( simulation :: FakeAp :: ASSOC_IGNORED ) ; aps_ . push_back ( & ap ) ; context_ . expected_results . push_front ( WLAN_ASSOC_RESULT_REFUSED_REASON_UNSPECIFIED ) ; ScheduleAssocReq ( zx :: msec ( 10 ) ) ; env_ -> Run ( ) ; EXPECT_EQ ( assoc_responses_ . size ( ) , 0U ) ; EXPECT_EQ ( context_ . assoc_resp_count , 1U ) ; }
Verify that if an AP does not respond to an association response we return a failure
Verify that if an AP does not respond to an association response we return a failure
// Create our device instance // Start up fake APs // Make sure no responses were sent back from the fake AP // But we still got our response from the driver