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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/profile_resetter/automatic_profile_resetter.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 // Register some additional local state preferences for testing purposes. 503 // Register some additional local state preferences for testing purposes.
504 PrefRegistrySimple* local_state_registry = local_state_.Get()->registry(); 504 PrefRegistrySimple* local_state_registry = local_state_.Get()->registry();
505 DCHECK(local_state_registry); 505 DCHECK(local_state_registry);
506 local_state_registry->RegisterStringPref(kTestPreferencePath, ""); 506 local_state_registry->RegisterStringPref(kTestPreferencePath, "");
507 507
508 // Register some additional user preferences for testing purposes. 508 // Register some additional user preferences for testing purposes.
509 user_prefs::PrefRegistrySyncable* user_prefs_registry = 509 user_prefs::PrefRegistrySyncable* user_prefs_registry =
510 profile_->GetTestingPrefService()->registry(); 510 profile_->GetTestingPrefService()->registry();
511 DCHECK(user_prefs_registry); 511 DCHECK(user_prefs_registry);
512 user_prefs_registry->RegisterStringPref( 512 user_prefs_registry->RegisterStringPref(kTestPreferencePath, std::string());
513 kTestPreferencePath, std::string(),
514 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
515 } 513 }
516 514
517 void SetUp() override { 515 void SetUp() override {
518 variations::testing::ClearAllVariationParams(); 516 variations::testing::ClearAllVariationParams();
519 base::FieldTrialList::CreateFieldTrial(kAutomaticProfileResetStudyName, 517 base::FieldTrialList::CreateFieldTrial(kAutomaticProfileResetStudyName,
520 experiment_group_name_); 518 experiment_group_name_);
521 resetter_.reset( 519 resetter_.reset(
522 new testing::StrictMock<AutomaticProfileResetterUnderTest>(profile())); 520 new testing::StrictMock<AutomaticProfileResetterUnderTest>(profile()));
523 mock_delegate_owned_.reset( 521 mock_delegate_owned_.reset(
524 new testing::StrictMock<MockProfileResetterDelegate>()); 522 new testing::StrictMock<MockProfileResetterDelegate>());
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 mock_delegate().ExpectCallsToDependenciesSetUpMethods(); 1367 mock_delegate().ExpectCallsToDependenciesSetUpMethods();
1370 mock_delegate().ExpectCallsToGetterMethods(); 1368 mock_delegate().ExpectCallsToGetterMethods();
1371 uint32 expected_mask = 1369 uint32 expected_mask =
1372 HAS_EXPECTED_MODULE_DIGEST_1 | HAS_EXPECTED_MODULE_DIGEST_2; 1370 HAS_EXPECTED_MODULE_DIGEST_1 | HAS_EXPECTED_MODULE_DIGEST_2;
1373 EXPECT_CALL(resetter(), ReportStatistics(0x00u, expected_mask)); 1371 EXPECT_CALL(resetter(), ReportStatistics(0x00u, expected_mask));
1374 1372
1375 UnleashResetterAndWait(); 1373 UnleashResetterAndWait();
1376 } 1374 }
1377 1375
1378 } // namespace 1376 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698