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

Side by Side Diff: components/password_manager/sync/browser/password_manager_setting_migrator_service_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "base/json/json_writer.h" 5 #include "base/json/json_writer.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/test/histogram_tester.h" 8 #include "base/test/histogram_tester.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "components/password_manager/core/browser/password_manager.h" 11 #include "components/password_manager/core/browser/password_manager.h"
12 #include "components/password_manager/core/common/password_manager_pref_names.h" 12 #include "components/password_manager/core/common/password_manager_pref_names.h"
13 #include "components/password_manager/sync/browser/password_manager_setting_migr ator_service.h" 13 #include "components/password_manager/sync/browser/password_manager_setting_migr ator_service.h"
14 #include "components/pref_registry/testing_pref_service_syncable.h" 14 #include "components/pref_registry/testing_pref_service_syncable.h"
15 #include "components/prefs/pref_service.h" 15 #include "components/prefs/pref_service.h"
16 #include "components/sync/api/fake_sync_change_processor.h"
17 #include "components/sync/api/sync_error_factory.h"
18 #include "components/sync/api/sync_error_factory_mock.h"
19 #include "components/sync/core/attachments/attachment_service_proxy_for_test.h"
20 #include "components/sync/protocol/sync.pb.h"
16 #include "components/sync_driver/fake_sync_service.h" 21 #include "components/sync_driver/fake_sync_service.h"
17 #include "components/syncable_prefs/pref_model_associator_client.h" 22 #include "components/syncable_prefs/pref_model_associator_client.h"
18 #include "components/syncable_prefs/pref_service_mock_factory.h" 23 #include "components/syncable_prefs/pref_service_mock_factory.h"
19 #include "components/syncable_prefs/pref_service_syncable.h" 24 #include "components/syncable_prefs/pref_service_syncable.h"
20 #include "sync/api/fake_sync_change_processor.h"
21 #include "sync/api/sync_error_factory.h"
22 #include "sync/api/sync_error_factory_mock.h"
23 #include "sync/internal_api/public/attachments/attachment_service_proxy_for_test .h"
24 #include "sync/protocol/sync.pb.h"
25 #include "testing/gmock/include/gmock/gmock.h" 25 #include "testing/gmock/include/gmock/gmock.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 namespace { 28 namespace {
29 29
30 const char kFieldTrialName[] = "PasswordManagerSettingsMigration"; 30 const char kFieldTrialName[] = "PasswordManagerSettingsMigration";
31 const char kEnabledGroupName[] = "Enable"; 31 const char kEnabledGroupName[] = "Enable";
32 const char kDisabledGroupName[] = "Disable"; 32 const char kDisabledGroupName[] = "Disable";
33 33
34 const char kInitialValuesHistogramName[] = 34 const char kInitialValuesHistogramName[] =
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); 453 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true);
454 profile_sync_service()->SetCanSyncStart(false); 454 profile_sync_service()->SetCanSyncStart(false);
455 base::HistogramTester tester; 455 base::HistogramTester tester;
456 NotifyProfileAdded(); 456 NotifyProfileAdded();
457 ExpectValuesForBothPrefValues(true, true); 457 ExpectValuesForBothPrefValues(true, true);
458 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), 458 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName),
459 testing::ElementsAre(base::Bucket(I11F11, 1))); 459 testing::ElementsAre(base::Bucket(I11F11, 1)));
460 } 460 }
461 461
462 } // namespace password_manager 462 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/sync/browser/DEPS ('k') | components/password_manager/sync/browser/password_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698