OLD | NEW |
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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/files/scoped_temp_dir.h" | 6 #include "base/files/scoped_temp_dir.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/history/android/android_cache_database.h" | 8 #include "chrome/browser/history/android/android_cache_database.h" |
9 #include "chrome/browser/history/android/android_time.h" | 9 #include "chrome/browser/history/android/android_time.h" |
10 #include "chrome/browser/history/history_database.h" | 10 #include "chrome/browser/history/history_database.h" |
11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 using base::Time; | 14 using base::Time; |
15 using base::TimeDelta; | 15 using base::TimeDelta; |
16 | 16 |
17 namespace history { | 17 namespace history { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 EXPECT_FALSE(history_db_.GetSearchTerm(update_row1.term, NULL)); | 105 EXPECT_FALSE(history_db_.GetSearchTerm(update_row1.term, NULL)); |
106 // The search_term2 should still in the table. | 106 // The search_term2 should still in the table. |
107 ASSERT_EQ(id2, history_db_.GetSearchTerm(search_term2, &row1)); | 107 ASSERT_EQ(id2, history_db_.GetSearchTerm(search_term2, &row1)); |
108 EXPECT_EQ(id2, row1.id); | 108 EXPECT_EQ(id2, row1.id); |
109 EXPECT_EQ(ToDatabaseTime(search_time2), | 109 EXPECT_EQ(ToDatabaseTime(search_time2), |
110 ToDatabaseTime(row1.last_visit_time)); | 110 ToDatabaseTime(row1.last_visit_time)); |
111 EXPECT_EQ(search_term2, row1.term); | 111 EXPECT_EQ(search_term2, row1.term); |
112 } | 112 } |
113 | 113 |
114 } // namespace history | 114 } // namespace history |
OLD | NEW |