Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/browser/history/expire_history_backend_unittest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/test_util.cc ('k') | chrome/browser/history/history_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698