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

Unified Diff: chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 2719833002: Convert TrackedPreferenceValidationDelegate into a mojo interface. (Closed)
Patch Set: Created 3 years, 9 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 | « chrome/browser/prefs/profile_pref_store_manager.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/profile_pref_store_manager_unittest.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
index 49d38849602f9beb115998d9257b749e3bdcc2d1..8a7805606ce846aa266c911c67ca9f608040de0c 100644
--- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
@@ -99,6 +99,9 @@ class ProfilePrefStoreManagerTest : public testing::Test {
reset_recorded_(false) {}
void SetUp() override {
+ mock_validation_delegate_record_ = new MockValidationDelegateRecord;
+ mock_validation_delegate_ = base::MakeUnique<MockValidationDelegate>(
+ mock_validation_delegate_record_);
ProfilePrefStoreManager::RegisterProfilePrefs(profile_pref_registry_.get());
for (const PrefHashFilter::TrackedPreferenceMetadata* it = kConfiguration;
it != kConfiguration + arraysize(kConfiguration);
@@ -172,7 +175,7 @@ class ProfilePrefStoreManagerTest : public testing::Test {
main_message_loop_.task_runner(),
base::Bind(&ProfilePrefStoreManagerTest::RecordReset,
base::Unretained(this)),
- &mock_validation_delegate_);
+ mock_validation_delegate_.get());
InitializePrefStore(pref_store.get());
pref_store = NULL;
base::RunLoop().RunUntilIdle();
@@ -256,7 +259,7 @@ class ProfilePrefStoreManagerTest : public testing::Test {
// No validations are expected for platforms that do not support tracking.
if (!ProfilePrefStoreManager::kPlatformSupportsPreferenceTracking)
return;
- if (!mock_validation_delegate_.GetEventForPath(pref_path))
+ if (!mock_validation_delegate_record_->GetEventForPath(pref_path))
ADD_FAILURE() << "No validation observed for preference: " << pref_path;
}
@@ -266,7 +269,8 @@ class ProfilePrefStoreManagerTest : public testing::Test {
TestingPrefServiceSimple local_state_;
scoped_refptr<user_prefs::PrefRegistrySyncable> profile_pref_registry_;
RegistryVerifier registry_verifier_;
- MockValidationDelegate mock_validation_delegate_;
+ scoped_refptr<MockValidationDelegateRecord> mock_validation_delegate_record_;
+ std::unique_ptr<MockValidationDelegate> mock_validation_delegate_;
std::unique_ptr<ProfilePrefStoreManager> manager_;
scoped_refptr<PersistentPrefStore> pref_store_;
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698