OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/platform_test.h" | 7 #include "base/platform_test.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/history/text_database.h" | 10 #include "chrome/browser/history/text_database.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
| 13 using base::Time; |
| 14 |
13 namespace history { | 15 namespace history { |
14 | 16 |
15 namespace { | 17 namespace { |
16 | 18 |
17 // Note that all pages have "COUNTTAG" which allows us to count the number of | 19 // Note that all pages have "COUNTTAG" which allows us to count the number of |
18 // pages in the database withoujt adding any extra functions to the DB object. | 20 // pages in the database withoujt adding any extra functions to the DB object. |
19 const char kURL1[] = "http://www.google.com/"; | 21 const char kURL1[] = "http://www.google.com/"; |
20 const int kTime1 = 1000; | 22 const int kTime1 = 1000; |
21 const char kTitle1[] = "Google"; | 23 const char kTitle1[] = "Google"; |
22 const char kBody1[] = "COUNTTAG Web Images Maps News Shopping Gmail more My Acco
unt | " | 24 const char kBody1[] = "COUNTTAG Web Images Maps News Shopping Gmail more My Acco
unt | " |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 317 |
316 // There should be one result, the most recent one. | 318 // There should be one result, the most recent one. |
317 EXPECT_EQ(1U, results.size()); | 319 EXPECT_EQ(1U, results.size()); |
318 EXPECT_TRUE(ResultsHaveURL(results, kURL2)); | 320 EXPECT_TRUE(ResultsHaveURL(results, kURL2)); |
319 | 321 |
320 // The max time considered should be the date of the returned item. | 322 // The max time considered should be the date of the returned item. |
321 EXPECT_EQ(kTime2, first_time_searched.ToInternalValue()); | 323 EXPECT_EQ(kTime2, first_time_searched.ToInternalValue()); |
322 } | 324 } |
323 | 325 |
324 } // namespace history | 326 } // namespace history |
OLD | NEW |