src/net/cert/nss_cert_database_chromeos_unittest.cc
TEST_F(NSSCertDatabaseChromeOSTest, NoCrashIfShutdownBeforeDoneOnWorkerPool) {
  ScopedCERTCertificateList certlist;
  db_1_->ListCerts(base::BindOnce(&SwapCertLists, base::Unretained(&certlist)));
  EXPECT_EQ(0U, certlist.size());

  db_1_.reset();

  RunUntilIdle();

  EXPECT_LT(0U, certlist.size());
}
// Tests that There is no crash if the database is deleted while ListCerts
// is being processed on the worker pool.
Tests that There is no crash if the database is deleted while ListCerts
is being processed on the worker pool.
Tests that There is no crash if the database is deleted while ListCerts is being processed on the worker pool .
TEST_F(NSSCertDatabaseChromeOSTest, NoCrashIfShutdownBeforeDoneOnWorkerPool) {
  ScopedCERTCertificateList certlist;
  db_1_->ListCerts(base::BindOnce(&SwapCertLists, base::Unretained(&certlist)));
  EXPECT_EQ(0U, certlist.size());
  db_1_.reset();
  RunUntilIdle();
  EXPECT_LT(0U, certlist.size());
}
TEST_F ( NSSCertDatabaseChromeOSTest , NoCrashIfShutdownBeforeDoneOnWorkerPool ) { ScopedCERTCertificateList certlist ; db_1_ -> ListCerts ( base :: BindOnce ( & SwapCertLists , base :: Unretained ( & certlist ) ) ) ; EXPECT_EQ ( 0U , certlist . size ( ) ) ; db_1_ . reset ( ) ; RunUntilIdle ( ) ; EXPECT_LT ( 0U , certlist . size ( ) ) ; }
Tests that There is no crash if the database is deleted while ListCerts
is being processed on the worker pool.
Tests that There is no crash if the database is deleted while ListCerts is being processed on the worker pool .