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 |
912 // Factor |autofill_profiles| address information separately from name, email, | 919 // Factor |autofill_profiles| address information separately from name, email, |
913 // and phone. | 920 // and phone. |
914 TEST_F(WebDatabaseMigrationTest, MigrateVersion32ToCurrent) { | 921 TEST_F(WebDatabaseMigrationTest, MAYBE_MigrateVersion32ToCurrent) { |
915 // Initialize the database. | 922 // Initialize the database. |
916 ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_32.sql"))); | 923 ASSERT_NO_FATAL_FAILURE(LoadDatabase(FILE_PATH_LITERAL("version_32.sql"))); |
917 | 924 |
918 // Verify pre-conditions. These are expectations for version 32 of the | 925 // Verify pre-conditions. These are expectations for version 32 of the |
919 // database. | 926 // database. |
920 { | 927 { |
921 sql::Connection connection; | 928 sql::Connection connection; |
922 ASSERT_TRUE(connection.Open(GetDatabasePath())); | 929 ASSERT_TRUE(connection.Open(GetDatabasePath())); |
923 | 930 |
924 // Verify existence of columns we'll be changing. | 931 // Verify existence of columns we'll be changing. |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 ASSERT_TRUE(connection.Open(GetDatabasePath())); | 1505 ASSERT_TRUE(connection.Open(GetDatabasePath())); |
1499 | 1506 |
1500 // Check version. | 1507 // Check version. |
1501 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); | 1508 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); |
1502 | 1509 |
1503 // |keywords| |sync_guid| column should have been added. | 1510 // |keywords| |sync_guid| column should have been added. |
1504 EXPECT_TRUE(connection.DoesColumnExist("keywords", "id")); | 1511 EXPECT_TRUE(connection.DoesColumnExist("keywords", "id")); |
1505 EXPECT_TRUE(connection.DoesColumnExist("keywords", "sync_guid")); | 1512 EXPECT_TRUE(connection.DoesColumnExist("keywords", "sync_guid")); |
1506 } | 1513 } |
1507 } | 1514 } |
OLD | NEW |