Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use callback_list in PolicyCertVerifier. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
diff --git a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
index 6b48c5cad2e4674e212ac93c91b0ab9fe2633da9..f9c854f1e3cf96b2296a13dd09427d34283be449 100644
--- a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
+++ b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
@@ -246,14 +246,14 @@ TEST_F(NetworkConfigurationUpdaterTest,
// Certificates with the "Web" trust flag set should not be forwarded to the
// trust provider.
- policy::PolicyCertVerifier cert_verifier((
- base::Closure() /* no policy cert trusted callback */));
+ policy::PolicyCertVerifier cert_verifier;
updater->SetPolicyCertVerifier(&cert_verifier);
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(cert_verifier.GetAdditionalTrustAnchors().empty());
// |cert_verifier| must outlive the updater.
network_configuration_updater_.reset();
+ cert_verifier.ShutdownOnUIThread();
}
TEST_F(NetworkConfigurationUpdaterTest, AllowTrustedCertificatesFromPolicy) {
@@ -276,14 +276,14 @@ TEST_F(NetworkConfigurationUpdaterTest, AllowTrustedCertificatesFromPolicy) {
// Certificates with the "Web" trust flag set should be forwarded to the
// trust provider.
- policy::PolicyCertVerifier cert_verifier((
- base::Closure() /* no policy cert trusted callback */));
+ policy::PolicyCertVerifier cert_verifier;
updater->SetPolicyCertVerifier(&cert_verifier);
base::RunLoop().RunUntilIdle();
EXPECT_EQ(1u, cert_verifier.GetAdditionalTrustAnchors().size());
// |cert_verifier| must outlive the updater.
network_configuration_updater_.reset();
+ cert_verifier.ShutdownOnUIThread();
}
class NetworkConfigurationUpdaterTestWithParam

Powered by Google App Engine
This is Rietveld 408576698