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/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "chrome/browser/history/text_database_manager.h" | 7 #include "chrome/browser/history/text_database_manager.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
| 10 using base::Time; |
| 11 using base::TimeDelta; |
| 12 using base::TimeTicks; |
| 13 |
10 namespace history { | 14 namespace history { |
11 | 15 |
12 namespace { | 16 namespace { |
13 | 17 |
14 const char* kURL1 = "http://www.google.com/asdf"; | 18 const char* kURL1 = "http://www.google.com/asdf"; |
15 const wchar_t* kTitle1 = L"Google A"; | 19 const wchar_t* kTitle1 = L"Google A"; |
16 const wchar_t* kBody1 = L"FOO page one."; | 20 const wchar_t* kBody1 = L"FOO page one."; |
17 | 21 |
18 const char* kURL2 = "http://www.google.com/qwer"; | 22 const char* kURL2 = "http://www.google.com/qwer"; |
19 const wchar_t* kTitle2 = L"Google B"; | 23 const wchar_t* kTitle2 = L"Google B"; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 EXPECT_TRUE(ResultsHaveURL(results, kURL2)); | 458 EXPECT_TRUE(ResultsHaveURL(results, kURL2)); |
455 EXPECT_TRUE(ResultsHaveURL(results, kURL1)); | 459 EXPECT_TRUE(ResultsHaveURL(results, kURL1)); |
456 | 460 |
457 // Try to query some more, there should be no results. | 461 // Try to query some more, there should be no results. |
458 options.end_time = first_time_searched; | 462 options.end_time = first_time_searched; |
459 manager.GetTextMatches(L"FOO", options, &results, &first_time_searched); | 463 manager.GetTextMatches(L"FOO", options, &results, &first_time_searched); |
460 EXPECT_EQ(0, results.size()); | 464 EXPECT_EQ(0, results.size()); |
461 } | 465 } |
462 | 466 |
463 } // namespace history | 467 } // namespace history |
OLD | NEW |