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

Side by Side Diff: chrome/browser/webdata/autofill_table_unittest.cc

Issue 13191007: Pass app_locale directly to AutofillTable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome frame tests fix 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
« no previous file with comments | « chrome/browser/webdata/autofill_table.cc ('k') | chrome/browser/webdata/keyword_table.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
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_, std::string())); 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;
112 if (timestamp0 >= 0) 112 if (timestamp0 >= 0)
113 timestamps.push_back(Time::FromTimeT(timestamp0)); 113 timestamps.push_back(Time::FromTimeT(timestamp0));
114 if (timestamp1 >= 0) 114 if (timestamp1 >= 0)
(...skipping 1204 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 | « chrome/browser/webdata/autofill_table.cc ('k') | chrome/browser/webdata/keyword_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698