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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 expired_favicons.clear(); | 384 expired_favicons.clear(); |
385 expirer_.DeleteFaviconsIfPossible(favicon_set, &expired_favicons); | 385 expirer_.DeleteFaviconsIfPossible(favicon_set, &expired_favicons); |
386 EXPECT_TRUE(HasFavicon(icon_id)); | 386 EXPECT_TRUE(HasFavicon(icon_id)); |
387 EXPECT_TRUE(expired_favicons.empty()); | 387 EXPECT_TRUE(expired_favicons.empty()); |
388 } | 388 } |
389 | 389 |
390 // static | 390 // static |
391 bool ExpireHistoryTest::IsStringInFile(const base::FilePath& filename, | 391 bool ExpireHistoryTest::IsStringInFile(const base::FilePath& filename, |
392 const char* str) { | 392 const char* str) { |
393 std::string contents; | 393 std::string contents; |
394 EXPECT_TRUE(file_util::ReadFileToString(filename, &contents)); | 394 EXPECT_TRUE(base::ReadFileToString(filename, &contents)); |
395 return contents.find(str) != std::string::npos; | 395 return contents.find(str) != std::string::npos; |
396 } | 396 } |
397 | 397 |
398 // Deletes a URL with a favicon that it is the last referencer of, so that it | 398 // Deletes a URL with a favicon that it is the last referencer of, so that it |
399 // should also get deleted. | 399 // should also get deleted. |
400 // Fails near end of month. http://crbug.com/43586 | 400 // Fails near end of month. http://crbug.com/43586 |
401 TEST_F(ExpireHistoryTest, DISABLED_DeleteURLAndFavicon) { | 401 TEST_F(ExpireHistoryTest, DISABLED_DeleteURLAndFavicon) { |
402 URLID url_ids[3]; | 402 URLID url_ids[3]; |
403 Time visit_times[4]; | 403 Time visit_times[4]; |
404 AddExampleData(url_ids, visit_times); | 404 AddExampleData(url_ids, visit_times); |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 main_db_->GetVisitsForURL(url_id, &archived_visits); | 896 main_db_->GetVisitsForURL(url_id, &archived_visits); |
897 EXPECT_EQ(0U, archived_visits.size()); | 897 EXPECT_EQ(0U, archived_visits.size()); |
898 } | 898 } |
899 | 899 |
900 // TODO(brettw) add some visits with no URL to make sure everything is updated | 900 // TODO(brettw) add some visits with no URL to make sure everything is updated |
901 // properly. Have the visits also refer to nonexistent FTS rows. | 901 // properly. Have the visits also refer to nonexistent FTS rows. |
902 // | 902 // |
903 // Maybe also refer to invalid favicons. | 903 // Maybe also refer to invalid favicons. |
904 | 904 |
905 } // namespace history | 905 } // namespace history |
OLD | NEW |