| 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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 using ::testing::_; | 46 using ::testing::_; |
| 47 | 47 |
| 48 namespace { | 48 namespace { |
| 49 | 49 |
| 50 const char kFakeGroup[] = "FakeGroup"; | 50 const char kFakeGroup[] = "FakeGroup"; |
| 51 const char kSignInPromoDismissalReasonMetric[] = "PasswordManager.SignInPromo"; | 51 const char kSignInPromoDismissalReasonMetric[] = "PasswordManager.SignInPromo"; |
| 52 const char kSiteOrigin[] = "http://example.com/login"; | 52 const char kSiteOrigin[] = "http://example.com/login"; |
| 53 const char kUsername[] = "Admin"; | 53 const char kUsername[] = "Admin"; |
| 54 const char kUIDismissalReasonMetric[] = "PasswordManager.UIDismissalReason"; | 54 const char kUIDismissalReasonMetric[] = "PasswordManager.UIDismissalReason"; |
| 55 | 55 |
| 56 class TestSyncService : public ProfileSyncServiceMock { | 56 class TestSyncService : public browser_sync::ProfileSyncServiceMock { |
| 57 public: | 57 public: |
| 58 explicit TestSyncService(Profile* profile) | 58 explicit TestSyncService(Profile* profile) |
| 59 : ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest(profile)), | 59 : browser_sync::ProfileSyncServiceMock( |
| 60 CreateProfileSyncServiceParamsForTest(profile)), |
| 60 smartlock_enabled_(false) {} | 61 smartlock_enabled_(false) {} |
| 61 ~TestSyncService() override {} | 62 ~TestSyncService() override {} |
| 62 | 63 |
| 63 // FakeSyncService: | 64 // FakeSyncService: |
| 64 bool IsFirstSetupComplete() const override { return true; } | 65 bool IsFirstSetupComplete() const override { return true; } |
| 65 bool IsSyncAllowed() const override { return true; } | 66 bool IsSyncAllowed() const override { return true; } |
| 66 bool IsSyncActive() const override { return true; } | 67 bool IsSyncActive() const override { return true; } |
| 67 syncer::ModelTypeSet GetActiveDataTypes() const override { | 68 syncer::ModelTypeSet GetActiveDataTypes() const override { |
| 68 return smartlock_enabled_ ? syncer::ModelTypeSet::All() | 69 return smartlock_enabled_ ? syncer::ModelTypeSet::All() |
| 69 : syncer::ModelTypeSet(); | 70 : syncer::ModelTypeSet(); |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 ManageLinkTarget::SETTINGS_PAGE}, | 562 ManageLinkTarget::SETTINGS_PAGE}, |
| 562 {nullptr, SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE}, | 563 {nullptr, SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE}, |
| 563 {"Default", SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE}, | 564 {"Default", SmartLockStatus::DISABLE, ManageLinkTarget::SETTINGS_PAGE}, |
| 564 }; | 565 }; |
| 565 | 566 |
| 566 } // namespace | 567 } // namespace |
| 567 | 568 |
| 568 INSTANTIATE_TEST_CASE_P(Default, | 569 INSTANTIATE_TEST_CASE_P(Default, |
| 569 ManagePasswordsBubbleModelManageLinkTest, | 570 ManagePasswordsBubbleModelManageLinkTest, |
| 570 ::testing::ValuesIn(kManageLinkTestCases)); | 571 ::testing::ValuesIn(kManageLinkTestCases)); |
| OLD | NEW |