src/base/fuchsia/scoped_service_binding_unittest.cc
TEST_F(ScopedServiceBindingTest, ConnectDebugService) {
  // Remove the public service binding.
  service_binding_.reset();

  // Publish the test service to the "debug" directory.
  ScopedServiceBinding<testfidl::TestInterface> debug_service_binding(
      outgoing_directory_->debug_dir(), &test_service_);

  auto debug_stub =
      debug_service_directory_->Connect<testfidl::TestInterface>();
  VerifyTestInterface(&debug_stub, ZX_OK);

  auto release_stub =
      public_service_directory_->Connect<testfidl::TestInterface>();
  VerifyTestInterface(&release_stub, ZX_ERR_PEER_CLOSED);
}
// Verify that we can publish a debug service.
Verify that we can publish a debug service.
Verify that we can publish a debug service .
TEST_F(ScopedServiceBindingTest, ConnectDebugService) {
  service_binding_.reset();
  ScopedServiceBinding<testfidl::TestInterface> debug_service_binding(
      outgoing_directory_->debug_dir(), &test_service_);
  auto debug_stub =
      debug_service_directory_->Connect<testfidl::TestInterface>();
  VerifyTestInterface(&debug_stub, ZX_OK);
  auto release_stub =
      public_service_directory_->Connect<testfidl::TestInterface>();
  VerifyTestInterface(&release_stub, ZX_ERR_PEER_CLOSED);
}
TEST_F ( ScopedServiceBindingTest , ConnectDebugService ) { service_binding_ . reset ( ) ; ScopedServiceBinding < testfidl :: TestInterface > debug_service_binding ( outgoing_directory_ -> debug_dir ( ) , & test_service_ ) ; auto debug_stub = debug_service_directory_ -> Connect < testfidl :: TestInterface > ( ) ; VerifyTestInterface ( & debug_stub , ZX_OK ) ; auto release_stub = public_service_directory_ -> Connect < testfidl :: TestInterface > ( ) ; VerifyTestInterface ( & release_stub , ZX_ERR_PEER_CLOSED ) ; }
Verify that we can publish a debug service.
Verify that we can publish a debug service .
// Remove the public service binding. // Publish the test service to the "debug" directory.