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

Side by Side Diff: chrome/browser/webdata/web_database_migration_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/web_database.cc ('k') | chrome/browser/webdata/web_database_service.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 <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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
188 db.AddTable(&token_service_table); 188 db.AddTable(&token_service_table);
189 db.AddTable(&web_apps_table); 189 db.AddTable(&web_apps_table);
190 db.AddTable(&web_intents_table); 190 db.AddTable(&web_intents_table);
191 191
192 // This causes the migration to occur. 192 // This causes the migration to occur.
193 ASSERT_EQ(sql::INIT_OK, db.Init(GetDatabasePath(), std::string())); 193 ASSERT_EQ(sql::INIT_OK, db.Init(GetDatabasePath()));
194 } 194 }
195 195
196 protected: 196 protected:
197 // Current tested version number. When adding a migration in 197 // Current tested version number. When adding a migration in
198 // |WebDatabase::MigrateOldVersionsAsNeeded()| and changing the version number 198 // |WebDatabase::MigrateOldVersionsAsNeeded()| and changing the version number
199 // |kCurrentVersionNumber| this value should change to reflect the new version 199 // |kCurrentVersionNumber| this value should change to reflect the new version
200 // number and a new migration test added below. 200 // number and a new migration test added below.
201 static const int kCurrentTestedVersionNumber; 201 static const int kCurrentTestedVersionNumber;
202 202
203 base::FilePath GetDatabasePath() { 203 base::FilePath GetDatabasePath() {
(...skipping 1778 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
« no previous file with comments | « chrome/browser/webdata/web_database.cc ('k') | chrome/browser/webdata/web_database_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698