| OLD | NEW |
| 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 "components/autofill/core/browser/personal_data_manager.h" | 5 #include "components/autofill/core/browser/personal_data_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } // anonymous namespace | 107 } // anonymous namespace |
| 108 | 108 |
| 109 class PersonalDataManagerTest : public testing::Test { | 109 class PersonalDataManagerTest : public testing::Test { |
| 110 protected: | 110 protected: |
| 111 PersonalDataManagerTest() : autofill_table_(nullptr) {} | 111 PersonalDataManagerTest() : autofill_table_(nullptr) {} |
| 112 | 112 |
| 113 void SetUp() override { | 113 void SetUp() override { |
| 114 OSCryptMocker::SetUpWithSingleton(); | 114 OSCryptMocker::SetUpWithSingleton(); |
| 115 prefs_ = test::PrefServiceForTesting(); | 115 prefs_ = test::PrefServiceForTesting(); |
| 116 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 116 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 117 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); | 117 base::FilePath path = temp_dir_.GetPath().AppendASCII("TestWebDB"); |
| 118 web_database_ = | 118 web_database_ = |
| 119 new WebDatabaseService(path, base::ThreadTaskRunnerHandle::Get(), | 119 new WebDatabaseService(path, base::ThreadTaskRunnerHandle::Get(), |
| 120 base::ThreadTaskRunnerHandle::Get()); | 120 base::ThreadTaskRunnerHandle::Get()); |
| 121 | 121 |
| 122 // Setup account tracker. | 122 // Setup account tracker. |
| 123 signin_client_.reset(new TestSigninClient(prefs_.get())); | 123 signin_client_.reset(new TestSigninClient(prefs_.get())); |
| 124 account_tracker_.reset(new AccountTrackerService()); | 124 account_tracker_.reset(new AccountTrackerService()); |
| 125 account_tracker_->Initialize(signin_client_.get()); | 125 account_tracker_->Initialize(signin_client_.get()); |
| 126 signin_manager_.reset(new FakeSigninManagerBase(signin_client_.get(), | 126 signin_manager_.reset(new FakeSigninManagerBase(signin_client_.get(), |
| 127 account_tracker_.get())); | 127 account_tracker_.get())); |
| (...skipping 5213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5341 EnableAutofillProfileCleanup(); | 5341 EnableAutofillProfileCleanup(); |
| 5342 | 5342 |
| 5343 // The deduping routine should not be run. | 5343 // The deduping routine should not be run. |
| 5344 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine()); | 5344 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine()); |
| 5345 | 5345 |
| 5346 // The two duplicate profiles should still be present. | 5346 // The two duplicate profiles should still be present. |
| 5347 EXPECT_EQ(2U, personal_data_->GetProfiles().size()); | 5347 EXPECT_EQ(2U, personal_data_->GetProfiles().size()); |
| 5348 } | 5348 } |
| 5349 | 5349 |
| 5350 } // namespace autofill | 5350 } // namespace autofill |
| OLD | NEW |