src/connectivity/network/mdns/service/test/mdns_unit_tests.cc
// Regression test for fxb/55116.
Regression test for fxb/55116.
Regression test for fxb / 55116 .
TEST_F(MdnsUnitTests, Regression55116) {
  SetHasInterfaces(true);
  Start(false);
  Subscriber subscriber;
  under_test().SubscribeToService(kServiceName, &subscriber);
  RunLoopUntilIdle();
  EXPECT_FALSE(subscriber.InstanceDiscoveredCalled());
  subscriber.Unsubscribe();
  RunLoopUntilIdle();
  under_test().SubscribeToService(kServiceName, &subscriber);
  RunLoopUntilIdle();
  EXPECT_FALSE(subscriber.InstanceDiscoveredCalled());
  ReceiveQueryResponse();
  EXPECT_TRUE(subscriber.InstanceDiscoveredCalled());
  subscriber.Unsubscribe();
  under_test().Stop();
  RunLoopUntilIdle();
}
TEST_F ( MdnsUnitTests , Regression55116 ) { SetHasInterfaces ( true ) ; Start ( false ) ; Subscriber subscriber ; under_test ( ) . SubscribeToService ( kServiceName , & subscriber ) ; RunLoopUntilIdle ( ) ; EXPECT_FALSE ( subscriber . InstanceDiscoveredCalled ( ) ) ; subscriber . Unsubscribe ( ) ; RunLoopUntilIdle ( ) ; under_test ( ) . SubscribeToService ( kServiceName , & subscriber ) ; RunLoopUntilIdle ( ) ; EXPECT_FALSE ( subscriber . InstanceDiscoveredCalled ( ) ) ; ReceiveQueryResponse ( ) ; EXPECT_TRUE ( subscriber . InstanceDiscoveredCalled ( ) ) ; subscriber . Unsubscribe ( ) ; under_test ( ) . Stop ( ) ; RunLoopUntilIdle ( ) ; }
Regression test for fxb/55116.
Regression test for fxb / 55116 .
// Start. // Subscribe. // Unsubscribe. // Subscribe again. // Receive a response to the query. // Clean up.