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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover_unittest.cc

Issue 11742037: Make ServerBoundCertStore interface async, move SQLiteServerBoundCertStore load onto DB thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix login_utils_browsertest Created 7 years, 11 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/browsing_data/browsing_data_remover_unittest.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
index 9f8ceded29de317d709eaf11c72344d6b6bdf166..ad98c33e617d9bf04a32e6f532441c0c4dda14ab 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
@@ -297,6 +297,11 @@ class RemoveServerBoundCertTester : public net::SSLConfigService::Observer {
now + base::TimeDelta::FromDays(1));
}
+ void GetCertList(net::ServerBoundCertStore::ServerBoundCertList* certs) {
+ GetCertStore()->GetAllServerBoundCerts(
+ base::Bind(&RemoveServerBoundCertTester::GetAllCertsCallback, certs));
+ }
+
net::ServerBoundCertStore* GetCertStore() {
return server_bound_cert_service_->GetCertStore();
}
@@ -311,6 +316,12 @@ class RemoveServerBoundCertTester : public net::SSLConfigService::Observer {
}
private:
+ static void GetAllCertsCallback(
+ net::ServerBoundCertStore::ServerBoundCertList* dest,
+ const net::ServerBoundCertStore::ServerBoundCertList& result) {
+ *dest = result;
+ }
+
net::ServerBoundCertService* server_bound_cert_service_;
scoped_refptr<net::SSLConfigService> ssl_config_service_;
int ssl_config_changed_count_;
@@ -711,7 +722,8 @@ TEST_F(BrowsingDataRemoverTest, RemoveServerBoundCertLastHour) {
EXPECT_EQ(1, tester.ssl_config_changed_count());
ASSERT_EQ(1, tester.ServerBoundCertCount());
net::ServerBoundCertStore::ServerBoundCertList certs;
- tester.GetCertStore()->GetAllServerBoundCerts(&certs);
+ tester.GetCertList(&certs);
+ ASSERT_EQ(1U, certs.size());
EXPECT_EQ(kTestOrigin2, certs.front().server_identifier());
}

Powered by Google App Engine
This is Rietveld 408576698