Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: components/webdata/autofill/autofill_table_unittest.cc

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&, 91 typedef std::set<AutofillEntry, bool (*)(const AutofillEntry&,
92 const AutofillEntry&)>::iterator AutofillEntrySetIterator; 92 const AutofillEntry&)>::iterator AutofillEntrySetIterator;
93 93
94 virtual void SetUp() { 94 virtual void SetUp() {
95 #if defined(OS_MACOSX) 95 #if defined(OS_MACOSX)
96 Encryptor::UseMockKeychain(true); 96 Encryptor::UseMockKeychain(true);
97 #endif 97 #endif
98 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 98 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
99 file_ = temp_dir_.path().AppendASCII("TestWebDatabase"); 99 file_ = temp_dir_.path().AppendASCII("TestWebDatabase");
100 100
101 table_.reset(new AutofillTable); 101 table_.reset(new AutofillTable("en-US"));
102 db_.reset(new WebDatabase); 102 db_.reset(new WebDatabase);
103 db_->AddTable(table_.get()); 103 db_->AddTable(table_.get());
104 ASSERT_EQ(sql::INIT_OK, db_->Init(file_)); 104 ASSERT_EQ(sql::INIT_OK, db_->Init(file_));
105 } 105 }
106 106
107 static AutofillEntry MakeAutofillEntry(const char* name, 107 static AutofillEntry MakeAutofillEntry(const char* name,
108 const char* value, 108 const char* value,
109 time_t timestamp0, 109 time_t timestamp0,
110 time_t timestamp1) { 110 time_t timestamp1) {
111 std::vector<Time> timestamps; 111 std::vector<Time> timestamps;
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « components/webdata/autofill/autofill_table.cc ('k') | components/webdata/autofill/web_data_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698