OLD | NEW |
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" | |
15 #include "components/prefs/pref_service.h" | 14 #include "components/prefs/pref_service.h" |
16 #include "components/sync/driver/fake_sync_service.h" | 15 #include "components/sync/driver/fake_sync_service.h" |
17 #include "components/sync/model/attachments/attachment_service_proxy_for_test.h" | 16 #include "components/sync/model/attachments/attachment_service_proxy_for_test.h" |
18 #include "components/sync/model/fake_sync_change_processor.h" | 17 #include "components/sync/model/fake_sync_change_processor.h" |
19 #include "components/sync/model/sync_error_factory.h" | 18 #include "components/sync/model/sync_error_factory.h" |
20 #include "components/sync/model/sync_error_factory_mock.h" | 19 #include "components/sync/model/sync_error_factory_mock.h" |
21 #include "components/sync/protocol/sync.pb.h" | 20 #include "components/sync/protocol/sync.pb.h" |
22 #include "components/sync_preferences/pref_model_associator_client.h" | 21 #include "components/sync_preferences/pref_model_associator_client.h" |
23 #include "components/sync_preferences/pref_service_mock_factory.h" | 22 #include "components/sync_preferences/pref_service_mock_factory.h" |
24 #include "components/sync_preferences/pref_service_syncable.h" | 23 #include "components/sync_preferences/pref_service_syncable.h" |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); | 452 ASSERT_EQ(prefs()->GetBoolean(prefs::kCredentialsEnableService), true); |
454 profile_sync_service()->SetCanSyncStart(false); | 453 profile_sync_service()->SetCanSyncStart(false); |
455 base::HistogramTester tester; | 454 base::HistogramTester tester; |
456 NotifyProfileAdded(); | 455 NotifyProfileAdded(); |
457 ExpectValuesForBothPrefValues(true, true); | 456 ExpectValuesForBothPrefValues(true, true); |
458 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), | 457 EXPECT_THAT(tester.GetAllSamples(kInitialAndFinalValuesHistogramName), |
459 testing::ElementsAre(base::Bucket(I11F11, 1))); | 458 testing::ElementsAre(base::Bucket(I11F11, 1))); |
460 } | 459 } |
461 | 460 |
462 } // namespace password_manager | 461 } // namespace password_manager |
OLD | NEW |