OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "components/autofill/browser/webdata/autofill_entry.h" | 9 #include "components/autofill/core/browser/webdata/autofill_entry.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace autofill { | 12 namespace autofill { |
13 | 13 |
14 const unsigned int kMaxAutofillTimeStamps = 2; | 14 const unsigned int kMaxAutofillTimeStamps = 2; |
15 | 15 |
16 TEST(AutofillEntryTest, NoCulling) { | 16 TEST(AutofillEntryTest, NoCulling) { |
17 std::vector<base::Time> source, result; | 17 std::vector<base::Time> source, result; |
18 base::Time current = base::Time::Now(); | 18 base::Time current = base::Time::Now(); |
19 for (size_t i = 0; i < kMaxAutofillTimeStamps; ++i) | 19 for (size_t i = 0; i < kMaxAutofillTimeStamps; ++i) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 timestamps.push_back(cutoff_time - one_hour); | 73 timestamps.push_back(cutoff_time - one_hour); |
74 timestamps.push_back(cutoff_time - one_hour * 2); | 74 timestamps.push_back(cutoff_time - one_hour * 2); |
75 timestamps.push_back(cutoff_time - one_hour * 3); | 75 timestamps.push_back(cutoff_time - one_hour * 3); |
76 | 76 |
77 AutofillEntry entry_outside_the_limits(key, timestamps); | 77 AutofillEntry entry_outside_the_limits(key, timestamps); |
78 EXPECT_TRUE(entry_outside_the_limits.IsExpired()); | 78 EXPECT_TRUE(entry_outside_the_limits.IsExpired()); |
79 EXPECT_TRUE(entry_outside_the_limits.timestamps_culled()); | 79 EXPECT_TRUE(entry_outside_the_limits.timestamps_culled()); |
80 } | 80 } |
81 | 81 |
82 } // namespace autofill | 82 } // namespace autofill |
OLD | NEW |