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

Unified Diff: net/cert/sth_distributor_unittest.cc

Issue 2015503003: Certificate Transparency: Ensure no observers in STHDistributor d'tor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « net/cert/sth_distributor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/sth_distributor_unittest.cc
diff --git a/net/cert/sth_distributor_unittest.cc b/net/cert/sth_distributor_unittest.cc
index 1dcecf6b09dca5fe031fbb72719925e03b29bcf0..b4edd237424915261c2b9214615dc1a0acad8167 100644
--- a/net/cert/sth_distributor_unittest.cc
+++ b/net/cert/sth_distributor_unittest.cc
@@ -66,6 +66,7 @@ TEST_F(STHDistributorTest, NotifiesOfExistingSTHs) {
// registration were reported to the observer once registered.
EXPECT_EQ(2u, observer.sths.size());
EXPECT_EQ(1u, observer.sths.count(other_log));
+ distributor_.UnregisterObserver(&observer);
}
// Test that histograms are properly recorded for the STH age when an STH
@@ -124,6 +125,9 @@ TEST_F(STHDistributorTest, UpdatesObservedSTHData) {
EXPECT_EQ(1u, new_observer.sths.size());
EXPECT_NE(sample_sth_, new_observer.sths[GetTestPublicKeyId()]);
EXPECT_EQ(new_sth, new_observer.sths[GetTestPublicKeyId()]);
+
+ distributor_.UnregisterObserver(&new_observer);
+ distributor_.UnregisterObserver(&observer);
}
} // namespace
« no previous file with comments | « net/cert/sth_distributor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698