| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 EXPECT_EQ(1, results.urls().size()); | 461 EXPECT_EQ(1, results.urls().size()); |
| 462 EXPECT_TRUE(NthResultIs(results, 0, 4)); | 462 EXPECT_TRUE(NthResultIs(results, 0, 4)); |
| 463 } | 463 } |
| 464 */ | 464 */ |
| 465 | 465 |
| 466 // Test iterating over pages of results. | 466 // Test iterating over pages of results. |
| 467 TEST_F(HistoryQueryTest, Paging) { | 467 TEST_F(HistoryQueryTest, Paging) { |
| 468 // Since results are fetched 1 and 2 at a time, entry #0 and #6 will not | 468 // Since results are fetched 1 and 2 at a time, entry #0 and #6 will not |
| 469 // be de-duplicated. | 469 // be de-duplicated. |
| 470 int expected_results[] = { 4, 2, 3, 1, 7, 6, 5, 0 }; | 470 int expected_results[] = { 4, 2, 3, 1, 7, 6, 5, 0 }; |
| 471 TestPaging("", expected_results, arraysize(expected_results)); | 471 TestPaging(std::string(), expected_results, arraysize(expected_results)); |
| 472 } | 472 } |
| 473 | 473 |
| 474 TEST_F(HistoryQueryTest, FTSPaging) { | 474 TEST_F(HistoryQueryTest, FTSPaging) { |
| 475 // Since results are fetched 1 and 2 at a time, entry #0 and #6 will not | 475 // Since results are fetched 1 and 2 at a time, entry #0 and #6 will not |
| 476 // be de-duplicated. Entry #4 does not contain the text "title", so it | 476 // be de-duplicated. Entry #4 does not contain the text "title", so it |
| 477 // shouldn't appear. | 477 // shouldn't appear. |
| 478 int expected_results[] = { 2, 3, 1, 7, 6, 5 }; | 478 int expected_results[] = { 2, 3, 1, 7, 6, 5 }; |
| 479 TestPaging("title", expected_results, arraysize(expected_results)); | 479 TestPaging("title", expected_results, arraysize(expected_results)); |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // namespace history | 482 } // namespace history |
| OLD | NEW |