| 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" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // anonymous namespace | 81 } // anonymous namespace |
| 82 | 82 |
| 83 class AutofillTableTest : public testing::Test { | 83 class AutofillTableTest : public testing::Test { |
| 84 public: | 84 public: |
| 85 AutofillTableTest() {} | 85 AutofillTableTest() {} |
| 86 virtual ~AutofillTableTest() {} | 86 virtual ~AutofillTableTest() {} |
| 87 | 87 |
| 88 protected: | 88 protected: |
| 89 typedef std::vector<AutofillChange> AutofillChangeList; | |
| 90 typedef std::set<AutofillEntry, | 89 typedef std::set<AutofillEntry, |
| 91 bool (*)(const AutofillEntry&, const AutofillEntry&)> AutofillEntrySet; | 90 bool (*)(const AutofillEntry&, const AutofillEntry&)> AutofillEntrySet; |
| 92 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&, | 91 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&, |
| 93 const AutofillEntry&)>::iterator AutofillEntrySetIterator; | 92 const AutofillEntry&)>::iterator AutofillEntrySetIterator; |
| 94 | 93 |
| 95 virtual void SetUp() { | 94 virtual void SetUp() { |
| 96 #if defined(OS_MACOSX) | 95 #if defined(OS_MACOSX) |
| 97 Encryptor::UseMockKeychain(true); | 96 Encryptor::UseMockKeychain(true); |
| 98 #endif | 97 #endif |
| 99 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 98 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| (...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 | 1319 |
| 1321 // make sure the lists of entries match | 1320 // make sure the lists of entries match |
| 1322 ASSERT_EQ(expected_entries.size(), entry_set.size()); | 1321 ASSERT_EQ(expected_entries.size(), entry_set.size()); |
| 1323 AutofillEntrySetIterator it; | 1322 AutofillEntrySetIterator it; |
| 1324 for (it = entry_set.begin(); it != entry_set.end(); it++) { | 1323 for (it = entry_set.begin(); it != entry_set.end(); it++) { |
| 1325 expected_entries.erase(*it); | 1324 expected_entries.erase(*it); |
| 1326 } | 1325 } |
| 1327 | 1326 |
| 1328 EXPECT_EQ(0U, expected_entries.size()); | 1327 EXPECT_EQ(0U, expected_entries.size()); |
| 1329 } | 1328 } |
| OLD | NEW |