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

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

Issue 9811022: Misc. small cleanups to minimize TemplateURL refactoring diffs: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 EXPECT_EQ(0, s2.ColumnInt(8)); 614 EXPECT_EQ(0, s2.ColumnInt(8));
615 EXPECT_EQ(std::string("UTF-8"), s2.ColumnString(9)); 615 EXPECT_EQ(std::string("UTF-8"), s2.ColumnString(9));
616 EXPECT_EQ(true, s2.ColumnBool(10)); 616 EXPECT_EQ(true, s2.ColumnBool(10));
617 EXPECT_EQ(std::string("{google:baseSuggestURL}search?client=chrome&hl=" 617 EXPECT_EQ(std::string("{google:baseSuggestURL}search?client=chrome&hl="
618 "{language}&q={searchTerms}"), s2.ColumnString(11)); 618 "{language}&q={searchTerms}"), s2.ColumnString(11));
619 EXPECT_EQ(1, s2.ColumnInt(12)); 619 EXPECT_EQ(1, s2.ColumnInt(12));
620 EXPECT_EQ(true, s2.ColumnBool(13)); 620 EXPECT_EQ(true, s2.ColumnBool(13));
621 EXPECT_EQ(6245, s2.ColumnInt(14)); 621 EXPECT_EQ(6245, s2.ColumnInt(14));
622 EXPECT_EQ(false, s2.ColumnBool(15)); 622 EXPECT_EQ(false, s2.ColumnBool(15));
623 EXPECT_EQ(std::string(), s2.ColumnString(16)); 623 EXPECT_EQ(std::string(), s2.ColumnString(16));
624 EXPECT_EQ(0, s2.ColumnInt(17));
625 EXPECT_EQ(std::string(), s2.ColumnString(18));
624 } 626 }
625 } 627 }
626 628
627 // Makes sure date_modified is added correctly to autofill_profiles and 629 // Makes sure date_modified is added correctly to autofill_profiles and
628 // credit_cards. 630 // credit_cards.
629 TEST_F(WebDatabaseMigrationTest, MigrateVersion29ToCurrent) { 631 TEST_F(WebDatabaseMigrationTest, MigrateVersion29ToCurrent) {
630 // Initialize the database. 632 // Initialize the database.
631 ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_29.sql"))); 633 ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_29.sql")));
632 634
633 // Verify pre-conditions. These are expectations for version 29 of the 635 // Verify pre-conditions. These are expectations for version 29 of the
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 &default_search_provider_id_backup)); 1928 &default_search_provider_id_backup));
1927 // Backup ID must be updated to match the old default search provider ID. 1929 // Backup ID must be updated to match the old default search provider ID.
1928 EXPECT_EQ(default_search_provider_id, default_search_provider_id_backup); 1930 EXPECT_EQ(default_search_provider_id, default_search_provider_id_backup);
1929 1931
1930 std::string default_search_provider_id_backup_signature; 1932 std::string default_search_provider_id_backup_signature;
1931 EXPECT_TRUE(meta_table.GetValue(KeywordTable::kBackupSignatureKey, 1933 EXPECT_TRUE(meta_table.GetValue(KeywordTable::kBackupSignatureKey,
1932 &default_search_provider_id_backup_signature)); 1934 &default_search_provider_id_backup_signature));
1933 EXPECT_FALSE(default_search_provider_id_backup_signature.empty()); 1935 EXPECT_FALSE(default_search_provider_id_backup_signature.empty());
1934 } 1936 }
1935 } 1937 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698