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

Side by Side Diff: chrome/browser/chromeos/policy/policy_cert_verifier_browsertest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h" 5 #include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 net::NSSCertDatabase::TrustBits trust = 86 net::NSSCertDatabase::TrustBits trust =
87 cert_db_->GetCertTrust(cert.get(), type); 87 cert_db_->GetCertTrust(cert.get(), type);
88 EXPECT_EQ(net::NSSCertDatabase::TRUST_DEFAULT, trust); 88 EXPECT_EQ(net::NSSCertDatabase::TRUST_DEFAULT, trust);
89 89
90 return cert; 90 return cert;
91 } 91 }
92 92
93 protected: 93 protected:
94 crypto::ScopedTestNSSDB test_nssdb_; 94 crypto::ScopedTestNSSDB test_nssdb_;
95 net::NSSCertDatabase* cert_db_; 95 net::NSSCertDatabase* cert_db_;
96 MessageLoop loop_; 96 base::MessageLoop loop_;
97 content::TestBrowserThread ui_thread_; 97 content::TestBrowserThread ui_thread_;
98 content::TestBrowserThread io_thread_; 98 content::TestBrowserThread io_thread_;
99 TestingProfileManager profile_manager_; 99 TestingProfileManager profile_manager_;
100 TestingProfile* profile_; 100 TestingProfile* profile_;
101 MockCertTrustAnchorProvider trust_provider_; 101 MockCertTrustAnchorProvider trust_provider_;
102 scoped_ptr<PolicyCertVerifier> cert_verifier_; 102 scoped_ptr<PolicyCertVerifier> cert_verifier_;
103 const net::CertificateList empty_cert_list_; 103 const net::CertificateList empty_cert_list_;
104 }; 104 };
105 105
106 TEST_F(PolicyCertVerifierTest, VerifyUntrustedCert) { 106 TEST_F(PolicyCertVerifierTest, VerifyUntrustedCert) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // Note: this hits the cached result from the first Verify() in this test. 288 // Note: this hits the cached result from the first Verify() in this test.
289 EXPECT_EQ(net::ERR_CERT_AUTHORITY_INVALID, error); 289 EXPECT_EQ(net::ERR_CERT_AUTHORITY_INVALID, error);
290 290
291 // The profile is still tainted. 291 // The profile is still tainted.
292 base::RunLoop().RunUntilIdle(); 292 base::RunLoop().RunUntilIdle();
293 EXPECT_TRUE( 293 EXPECT_TRUE(
294 profile_->GetPrefs()->GetBoolean(prefs::kUsedPolicyCertificatesOnce)); 294 profile_->GetPrefs()->GetBoolean(prefs::kUsedPolicyCertificatesOnce));
295 } 295 }
296 296
297 } // namespace policy 297 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698