| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // anonymous namespace | 82 } // anonymous namespace |
| 83 | 83 |
| 84 class AutofillTableTest : public testing::Test { | 84 class AutofillTableTest : public testing::Test { |
| 85 public: | 85 public: |
| 86 AutofillTableTest() {} | 86 AutofillTableTest() {} |
| 87 virtual ~AutofillTableTest() {} | 87 virtual ~AutofillTableTest() {} |
| 88 | 88 |
| 89 protected: | 89 protected: |
| 90 typedef std::vector<AutofillChange> AutofillChangeList; | |
| 91 typedef std::set<AutofillEntry, | 90 typedef std::set<AutofillEntry, |
| 92 bool (*)(const AutofillEntry&, const AutofillEntry&)> AutofillEntrySet; | 91 bool (*)(const AutofillEntry&, const AutofillEntry&)> AutofillEntrySet; |
| 93 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&, | 92 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&, |
| 94 const AutofillEntry&)>::iterator AutofillEntrySetIterator; | 93 const AutofillEntry&)>::iterator AutofillEntrySetIterator; |
| 95 | 94 |
| 96 virtual void SetUp() { | 95 virtual void SetUp() { |
| 97 #if defined(OS_MACOSX) | 96 #if defined(OS_MACOSX) |
| 98 Encryptor::UseMockKeychain(true); | 97 Encryptor::UseMockKeychain(true); |
| 99 #endif | 98 #endif |
| 100 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 99 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 | 1434 |
| 1436 // make sure the lists of entries match | 1435 // make sure the lists of entries match |
| 1437 ASSERT_EQ(expected_entries.size(), entry_set.size()); | 1436 ASSERT_EQ(expected_entries.size(), entry_set.size()); |
| 1438 AutofillEntrySetIterator it; | 1437 AutofillEntrySetIterator it; |
| 1439 for (it = entry_set.begin(); it != entry_set.end(); it++) { | 1438 for (it = entry_set.begin(); it != entry_set.end(); it++) { |
| 1440 expected_entries.erase(*it); | 1439 expected_entries.erase(*it); |
| 1441 } | 1440 } |
| 1442 | 1441 |
| 1443 EXPECT_EQ(0U, expected_entries.size()); | 1442 EXPECT_EQ(0U, expected_entries.size()); |
| 1444 } | 1443 } |
| OLD | NEW |