| 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 <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" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "chrome/browser/webdata/autofill_change.h" | |
| 15 #include "chrome/browser/webdata/autofill_entry.h" | |
| 16 #include "chrome/browser/webdata/autofill_table.h" | |
| 17 #include "chrome/browser/webdata/web_database.h" | |
| 18 #include "components/autofill/browser/autofill_profile.h" | 14 #include "components/autofill/browser/autofill_profile.h" |
| 19 #include "components/autofill/browser/autofill_type.h" | 15 #include "components/autofill/browser/autofill_type.h" |
| 20 #include "components/autofill/browser/credit_card.h" | 16 #include "components/autofill/browser/credit_card.h" |
| 21 #include "components/autofill/common/form_field_data.h" | 17 #include "components/autofill/common/form_field_data.h" |
| 18 #include "components/webdata/autofill/autofill_change.h" |
| 19 #include "components/webdata/autofill/autofill_entry.h" |
| 20 #include "components/webdata/autofill/autofill_table.h" |
| 21 #include "components/webdata/common/web_database.h" |
| 22 #include "components/webdata/encryptor/encryptor.h" | 22 #include "components/webdata/encryptor/encryptor.h" |
| 23 #include "sql/statement.h" | 23 #include "sql/statement.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 | 25 |
| 26 using base::Time; | 26 using base::Time; |
| 27 using base::TimeDelta; | 27 using base::TimeDelta; |
| 28 | 28 |
| 29 // So we can compare AutofillKeys with EXPECT_EQ(). | 29 // So we can compare AutofillKeys with EXPECT_EQ(). |
| 30 std::ostream& operator<<(std::ostream& os, const AutofillKey& key) { | 30 std::ostream& operator<<(std::ostream& os, const AutofillKey& key) { |
| 31 return os << UTF16ToASCII(key.name()) << ", " << UTF16ToASCII(key.value()); | 31 return os << UTF16ToASCII(key.name()) << ", " << UTF16ToASCII(key.value()); |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 | 1319 |
| 1320 // make sure the lists of entries match | 1320 // make sure the lists of entries match |
| 1321 ASSERT_EQ(expected_entries.size(), entry_set.size()); | 1321 ASSERT_EQ(expected_entries.size(), entry_set.size()); |
| 1322 AutofillEntrySetIterator it; | 1322 AutofillEntrySetIterator it; |
| 1323 for (it = entry_set.begin(); it != entry_set.end(); it++) { | 1323 for (it = entry_set.begin(); it != entry_set.end(); it++) { |
| 1324 expected_entries.erase(*it); | 1324 expected_entries.erase(*it); |
| 1325 } | 1325 } |
| 1326 | 1326 |
| 1327 EXPECT_EQ(0U, expected_entries.size()); | 1327 EXPECT_EQ(0U, expected_entries.size()); |
| 1328 } | 1328 } |
| OLD | NEW |