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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 ElementsEqual<T>).first, | 88 ElementsEqual<T>).first, |
89 results_copy.end()); | 89 results_copy.end()); |
90 } | 90 } |
91 | 91 |
92 } // anonymous namespace | 92 } // anonymous namespace |
93 | 93 |
94 class PersonalDataManagerTest : public testing::Test { | 94 class PersonalDataManagerTest : public testing::Test { |
95 protected: | 95 protected: |
96 PersonalDataManagerTest() {} | 96 PersonalDataManagerTest() {} |
97 | 97 |
98 virtual void SetUp() { | 98 void SetUp() override { |
99 prefs_ = test::PrefServiceForTesting(); | 99 prefs_ = test::PrefServiceForTesting(); |
100 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 100 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
101 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); | 101 base::FilePath path = temp_dir_.path().AppendASCII("TestWebDB"); |
102 web_database_ = new WebDatabaseService(path, | 102 web_database_ = new WebDatabaseService(path, |
103 base::MessageLoopProxy::current(), | 103 base::MessageLoopProxy::current(), |
104 base::MessageLoopProxy::current()); | 104 base::MessageLoopProxy::current()); |
105 web_database_->AddTable( | 105 web_database_->AddTable( |
106 scoped_ptr<WebDatabaseTable>(new AutofillTable("en-US"))); | 106 scoped_ptr<WebDatabaseTable>(new AutofillTable("en-US"))); |
107 web_database_->LoadDatabase(); | 107 web_database_->LoadDatabase(); |
108 autofill_database_service_ = | 108 autofill_database_service_ = |
(...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2741 | 2741 |
2742 prefs_->SetInteger(prefs::kAutofillMacAddressBookShowedCount, 4); | 2742 prefs_->SetInteger(prefs::kAutofillMacAddressBookShowedCount, 4); |
2743 EXPECT_TRUE(personal_data_->ShouldShowAccessAddressBookSuggestion(type)); | 2743 EXPECT_TRUE(personal_data_->ShouldShowAccessAddressBookSuggestion(type)); |
2744 | 2744 |
2745 prefs_->SetInteger(prefs::kAutofillMacAddressBookShowedCount, 6); | 2745 prefs_->SetInteger(prefs::kAutofillMacAddressBookShowedCount, 6); |
2746 EXPECT_FALSE(personal_data_->ShouldShowAccessAddressBookSuggestion(type)); | 2746 EXPECT_FALSE(personal_data_->ShouldShowAccessAddressBookSuggestion(type)); |
2747 } | 2747 } |
2748 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 2748 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
2749 | 2749 |
2750 } // namespace autofill | 2750 } // namespace autofill |
OLD | NEW |