| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 using base::ASCIIToUTF16; | 27 using base::ASCIIToUTF16; |
| 28 using base::Time; | 28 using base::Time; |
| 29 using base::TimeDelta; | 29 using base::TimeDelta; |
| 30 | 30 |
| 31 namespace autofill { | 31 namespace autofill { |
| 32 | 32 |
| 33 // So we can compare AutofillKeys with EXPECT_EQ(). | 33 // So we can compare AutofillKeys with EXPECT_EQ(). |
| 34 std::ostream& operator<<(std::ostream& os, const AutofillKey& key) { | 34 std::ostream& operator<<(std::ostream& os, const AutofillKey& key) { |
| 35 return os << UTF16ToASCII(key.name()) << ", " << UTF16ToASCII(key.value()); | 35 return os << base::UTF16ToASCII(key.name()) << ", " |
| 36 << base::UTF16ToASCII(key.value()); |
| 36 } | 37 } |
| 37 | 38 |
| 38 // So we can compare AutofillChanges with EXPECT_EQ(). | 39 // So we can compare AutofillChanges with EXPECT_EQ(). |
| 39 std::ostream& operator<<(std::ostream& os, const AutofillChange& change) { | 40 std::ostream& operator<<(std::ostream& os, const AutofillChange& change) { |
| 40 switch (change.type()) { | 41 switch (change.type()) { |
| 41 case AutofillChange::ADD: { | 42 case AutofillChange::ADD: { |
| 42 os << "ADD"; | 43 os << "ADD"; |
| 43 break; | 44 break; |
| 44 } | 45 } |
| 45 case AutofillChange::UPDATE: { | 46 case AutofillChange::UPDATE: { |
| (...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1596 | 1597 |
| 1597 std::vector<AutofillEntry> entries; | 1598 std::vector<AutofillEntry> entries; |
| 1598 ASSERT_TRUE(table_->GetAllAutofillEntries(&entries)); | 1599 ASSERT_TRUE(table_->GetAllAutofillEntries(&entries)); |
| 1599 AutofillEntrySet entry_set(entries.begin(), entries.end(), | 1600 AutofillEntrySet entry_set(entries.begin(), entries.end(), |
| 1600 CompareAutofillEntries); | 1601 CompareAutofillEntries); |
| 1601 | 1602 |
| 1602 CompareAutofillEntrySets(entry_set, expected_entries); | 1603 CompareAutofillEntrySets(entry_set, expected_entries); |
| 1603 } | 1604 } |
| 1604 | 1605 |
| 1605 } // namespace autofill | 1606 } // namespace autofill |
| OLD | NEW |