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" | |
8 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
9 #include "base/string_util.h" | 8 #include "base/string_util.h" |
10 #include "chrome/browser/history/text_database.h" | 9 #include "chrome/browser/history/text_database.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "testing/platform_test.h" |
12 | 12 |
13 using base::Time; | 13 using base::Time; |
14 | 14 |
15 namespace history { | 15 namespace history { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // 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 |
20 // 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. |
21 const char kURL1[] = "http://www.google.com/"; | 21 const char kURL1[] = "http://www.google.com/"; |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 317 |
318 // There should be one result, the most recent one. | 318 // There should be one result, the most recent one. |
319 EXPECT_EQ(1U, results.size()); | 319 EXPECT_EQ(1U, results.size()); |
320 EXPECT_TRUE(ResultsHaveURL(results, kURL2)); | 320 EXPECT_TRUE(ResultsHaveURL(results, kURL2)); |
321 | 321 |
322 // 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. |
323 EXPECT_EQ(kTime2, first_time_searched.ToInternalValue()); | 323 EXPECT_EQ(kTime2, first_time_searched.ToInternalValue()); |
324 } | 324 } |
325 | 325 |
326 } // namespace history | 326 } // namespace history |
OLD | NEW |