| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 &credit_card_a, | 902 &credit_card_a, |
| 903 &cc_number_encrypted_a, | 903 &cc_number_encrypted_a, |
| 904 &cc_date_modified_a)); | 904 &cc_date_modified_a)); |
| 905 EXPECT_EQ(credit_card, credit_card_a); | 905 EXPECT_EQ(credit_card, credit_card_a); |
| 906 EXPECT_EQ(cc_label, cc_label_a); | 906 EXPECT_EQ(cc_label, cc_label_a); |
| 907 EXPECT_EQ(cc_number_encrypted, cc_number_encrypted_a); | 907 EXPECT_EQ(cc_number_encrypted, cc_number_encrypted_a); |
| 908 EXPECT_EQ(cc_date_modified, cc_date_modified_a); | 908 EXPECT_EQ(cc_date_modified, cc_date_modified_a); |
| 909 } | 909 } |
| 910 } | 910 } |
| 911 | 911 |
| 912 // Crashes on Win. http://crbug.com/92937 | |
| 913 #if defined(OS_WIN) | |
| 914 #define MAYBE_MigrateVersion32ToCurrent DISABLED_MigrateVersion32ToCurrent | |
| 915 #else | |
| 916 #define MAYBE_MigrateVersion32ToCurrent MigrateVersion32ToCurrent | |
| 917 #endif // defined(OS_WIN) | |
| 918 | |
| 919 // Factor |autofill_profiles| address information separately from name, email, | 912 // Factor |autofill_profiles| address information separately from name, email, |
| 920 // and phone. | 913 // and phone. |
| 921 TEST_F(WebDatabaseMigrationTest, MAYBE_MigrateVersion32ToCurrent) { | 914 TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { |
| 922 // Initialize the database. | 915 // Initialize the database. |
| 923 ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_32.sql"))); | 916 ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_32.sql"))); |
| 924 | 917 |
| 925 // Verify pre-conditions. These are expectations for version 32 of the | 918 // Verify pre-conditions. These are expectations for version 32 of the |
| 926 // database. | 919 // database. |
| 927 { | 920 { |
| 928 sql::Connection connection; | 921 sql::Connection connection; |
| 929 ASSERT_TRUE(connection.Open(GetDatabasePath())); | 922 ASSERT_TRUE(connection.Open(GetDatabasePath())); |
| 930 | 923 |
| 931 // Verify existence of columns we'll be changing. | 924 // Verify existence of columns we'll be changing. |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 ASSERT_TRUE(connection.Open(GetDatabasePath())); | 1498 ASSERT_TRUE(connection.Open(GetDatabasePath())); |
| 1506 | 1499 |
| 1507 // Check version. | 1500 // Check version. |
| 1508 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); | 1501 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); |
| 1509 | 1502 |
| 1510 // |keywords| |sync_guid| column should have been added. | 1503 // |keywords| |sync_guid| column should have been added. |
| 1511 EXPECT_TRUE(connection.DoesColumnExist("keywords", "id")); | 1504 EXPECT_TRUE(connection.DoesColumnExist("keywords", "id")); |
| 1512 EXPECT_TRUE(connection.DoesColumnExist("keywords", "sync_guid")); | 1505 EXPECT_TRUE(connection.DoesColumnExist("keywords", "sync_guid")); |
| 1513 } | 1506 } |
| 1514 } | 1507 } |
| OLD | NEW |