OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/passwords/manage_passwords_bubble_model.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
11 #include "base/metrics/histogram_samples.h" | 11 #include "base/metrics/histogram_samples.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
14 #include "base/test/histogram_tester.h" | 13 #include "base/test/histogram_tester.h" |
15 #include "base/test/simple_test_clock.h" | 14 #include "base/test/simple_test_clock.h" |
16 #include "chrome/browser/password_manager/password_store_factory.h" | 15 #include "chrome/browser/password_manager/password_store_factory.h" |
17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 16 #include "chrome/browser/sync/profile_sync_service_factory.h" |
18 #include "chrome/browser/sync/profile_sync_test_util.h" | 17 #include "chrome/browser/sync/profile_sync_test_util.h" |
19 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" | 18 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" |
20 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
21 #include "components/browser_sync/browser/profile_sync_service_mock.h" | 20 #include "components/browser_sync/browser/profile_sync_service_mock.h" |
22 #include "components/password_manager/core/browser/mock_password_store.h" | 21 #include "components/password_manager/core/browser/mock_password_store.h" |
23 #include "components/password_manager/core/browser/password_bubble_experiment.h" | 22 #include "components/password_manager/core/browser/password_bubble_experiment.h" |
24 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" | 23 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
25 #include "components/password_manager/core/browser/password_manager_test_utils.h
" | 24 #include "components/password_manager/core/browser/password_manager_test_utils.h
" |
26 #include "components/password_manager/core/browser/statistics_table.h" | 25 #include "components/password_manager/core/browser/statistics_table.h" |
27 #include "components/password_manager/core/common/credential_manager_types.h" | 26 #include "components/password_manager/core/common/credential_manager_types.h" |
28 #include "components/password_manager/core/common/password_manager_pref_names.h" | 27 #include "components/password_manager/core/common/password_manager_pref_names.h" |
29 #include "components/password_manager/core/common/password_manager_ui.h" | 28 #include "components/password_manager/core/common/password_manager_ui.h" |
| 29 #include "components/prefs/pref_service.h" |
30 #include "content/public/test/test_browser_thread_bundle.h" | 30 #include "content/public/test/test_browser_thread_bundle.h" |
31 #include "content/public/test/web_contents_tester.h" | 31 #include "content/public/test/web_contents_tester.h" |
32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
35 using password_bubble_experiment::kBrandingExperimentName; | 35 using password_bubble_experiment::kBrandingExperimentName; |
36 using password_bubble_experiment::kSmartLockBrandingGroupName; | 36 using password_bubble_experiment::kSmartLockBrandingGroupName; |
37 using password_bubble_experiment::kSmartLockBrandingSavePromptOnlyGroupName; | 37 using password_bubble_experiment::kSmartLockBrandingSavePromptOnlyGroupName; |
38 using ::testing::AnyNumber; | 38 using ::testing::AnyNumber; |
39 using ::testing::Return; | 39 using ::testing::Return; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 BrandLinkTarget::SMART_LOCK_HOME}, | 531 BrandLinkTarget::SMART_LOCK_HOME}, |
532 {kSmartLockBrandingSavePromptOnlyGroupName, SmartLockStatus::ENABLE, | 532 {kSmartLockBrandingSavePromptOnlyGroupName, SmartLockStatus::ENABLE, |
533 BrandLinkTarget::SMART_LOCK_HELP}, | 533 BrandLinkTarget::SMART_LOCK_HELP}, |
534 }; | 534 }; |
535 | 535 |
536 } // namespace | 536 } // namespace |
537 | 537 |
538 INSTANTIATE_TEST_CASE_P(Default, | 538 INSTANTIATE_TEST_CASE_P(Default, |
539 ManagePasswordsBubbleModelBrandLinkTest, | 539 ManagePasswordsBubbleModelBrandLinkTest, |
540 ::testing::ValuesIn(kBrandLinkTestCases)); | 540 ::testing::ValuesIn(kBrandLinkTestCases)); |
OLD | NEW |