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: chrome/browser/webdata/web_database_migration_unittest.cc

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 <string> 5 #include <string>
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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 167 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
168 } 168 }
169 169
170 // Load the database via the WebDatabase class and migrate the database to 170 // Load the database via the WebDatabase class and migrate the database to
171 // the current version. 171 // the current version.
172 void DoMigration() { 172 void DoMigration() {
173 // TODO(joi): This whole unit test file needs to stay in //chrome 173 // TODO(joi): This whole unit test file needs to stay in //chrome
174 // for now, as it needs to know about all the different table 174 // for now, as it needs to know about all the different table
175 // types. Once all webdata datatypes have been componentized, this 175 // types. Once all webdata datatypes have been componentized, this
176 // could move to components_unittests. 176 // could move to components_unittests.
177 AutofillTable autofill_table; 177 AutofillTable autofill_table("en-US");
178 KeywordTable keyword_table; 178 KeywordTable keyword_table;
179 LoginsTable logins_table; 179 LoginsTable logins_table;
180 TokenServiceTable token_service_table; 180 TokenServiceTable token_service_table;
181 WebAppsTable web_apps_table; 181 WebAppsTable web_apps_table;
182 WebIntentsTable web_intents_table; 182 WebIntentsTable web_intents_table;
183 183
184 WebDatabase db; 184 WebDatabase db;
185 db.AddTable(&autofill_table); 185 db.AddTable(&autofill_table);
186 db.AddTable(&keyword_table); 186 db.AddTable(&keyword_table);
187 db.AddTable(&logins_table); 187 db.AddTable(&logins_table);
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 ASSERT_TRUE(sql::MetaTable::DoesTableExist(&connection)); 1982 ASSERT_TRUE(sql::MetaTable::DoesTableExist(&connection));
1983 1983
1984 // Check version. 1984 // Check version.
1985 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); 1985 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection));
1986 1986
1987 // A new column should have been created. 1987 // A new column should have been created.
1988 EXPECT_TRUE(connection.DoesColumnExist("keywords", 1988 EXPECT_TRUE(connection.DoesColumnExist("keywords",
1989 "search_terms_replacement_key")); 1989 "search_terms_replacement_key"));
1990 } 1990 }
1991 } 1991 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698