| 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/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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); | 690 EXPECT_EQ(kCurrentTestedVersionNumber, VersionFromConnection(&connection)); |
| 691 | 691 |
| 692 // Check that the columns were created. | 692 // Check that the columns were created. |
| 693 EXPECT_TRUE(connection.DoesColumnExist("autofill_profiles", | 693 EXPECT_TRUE(connection.DoesColumnExist("autofill_profiles", |
| 694 "date_modified")); | 694 "date_modified")); |
| 695 EXPECT_TRUE(connection.DoesColumnExist("credit_cards", | 695 EXPECT_TRUE(connection.DoesColumnExist("credit_cards", |
| 696 "date_modified")); | 696 "date_modified")); |
| 697 | 697 |
| 698 sql::Statement s_profiles(connection.GetUniqueStatement( | 698 sql::Statement s_profiles(connection.GetUniqueStatement( |
| 699 "SELECT date_modified FROM autofill_profiles ")); | 699 "SELECT date_modified FROM autofill_profiles ")); |
| 700 ASSERT_TRUE(s_profiles); | 700 ASSERT_TRUE(s_profiles.is_valid()); |
| 701 while (s_profiles.Step()) { | 701 while (s_profiles.Step()) { |
| 702 EXPECT_GE(s_profiles.ColumnInt64(0), | 702 EXPECT_GE(s_profiles.ColumnInt64(0), |
| 703 pre_creation_time.ToTimeT()); | 703 pre_creation_time.ToTimeT()); |
| 704 EXPECT_LE(s_profiles.ColumnInt64(0), | 704 EXPECT_LE(s_profiles.ColumnInt64(0), |
| 705 post_creation_time.ToTimeT()); | 705 post_creation_time.ToTimeT()); |
| 706 } | 706 } |
| 707 EXPECT_TRUE(s_profiles.Succeeded()); | 707 EXPECT_TRUE(s_profiles.Succeeded()); |
| 708 | 708 |
| 709 sql::Statement s_credit_cards(connection.GetUniqueStatement( | 709 sql::Statement s_credit_cards(connection.GetUniqueStatement( |
| 710 "SELECT date_modified FROM credit_cards ")); | 710 "SELECT date_modified FROM credit_cards ")); |
| 711 ASSERT_TRUE(s_credit_cards); | 711 ASSERT_TRUE(s_credit_cards.is_valid()); |
| 712 while (s_credit_cards.Step()) { | 712 while (s_credit_cards.Step()) { |
| 713 EXPECT_GE(s_credit_cards.ColumnInt64(0), | 713 EXPECT_GE(s_credit_cards.ColumnInt64(0), |
| 714 pre_creation_time.ToTimeT()); | 714 pre_creation_time.ToTimeT()); |
| 715 EXPECT_LE(s_credit_cards.ColumnInt64(0), | 715 EXPECT_LE(s_credit_cards.ColumnInt64(0), |
| 716 post_creation_time.ToTimeT()); | 716 post_creation_time.ToTimeT()); |
| 717 } | 717 } |
| 718 EXPECT_TRUE(s_credit_cards.Succeeded()); | 718 EXPECT_TRUE(s_credit_cards.Succeeded()); |
| 719 } | 719 } |
| 720 } | 720 } |
| 721 | 721 |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1868 EXPECT_EQ("0", s.ColumnString(15)); | 1868 EXPECT_EQ("0", s.ColumnString(15)); |
| 1869 EXPECT_EQ("{google:baseURL}webhp?{google:RLZ}sourceid=chrome-instant&" | 1869 EXPECT_EQ("{google:baseURL}webhp?{google:RLZ}sourceid=chrome-instant&" |
| 1870 "ie={inputEncoding}&ion=1{searchTerms}&nord=1", | 1870 "ie={inputEncoding}&ion=1{searchTerms}&nord=1", |
| 1871 s.ColumnString(16)); | 1871 s.ColumnString(16)); |
| 1872 EXPECT_EQ("0", s.ColumnString(17)); | 1872 EXPECT_EQ("0", s.ColumnString(17)); |
| 1873 EXPECT_EQ("{1234-5678-90AB-CDEF}", s.ColumnString(18)); | 1873 EXPECT_EQ("{1234-5678-90AB-CDEF}", s.ColumnString(18)); |
| 1874 | 1874 |
| 1875 EXPECT_FALSE(s.Step()); | 1875 EXPECT_FALSE(s.Step()); |
| 1876 } | 1876 } |
| 1877 } | 1877 } |
| 1878 | |
| OLD | NEW |