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

Unified Diff: chrome/browser/history/top_sites_likely_impl_unittest.cc

Issue 19616004: Add asserts to TestingProfile::CreateHistoryService to ensure files are deleted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix release unit tests Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/top_sites_likely_impl_unittest.cc
diff --git a/chrome/browser/history/top_sites_likely_impl_unittest.cc b/chrome/browser/history/top_sites_likely_impl_unittest.cc
index 8ef73a226cf7a1a0423d658fb5bc082064149d30..01a9504e740e6777feba1a70ae483f1cb4a0b945 100644
--- a/chrome/browser/history/top_sites_likely_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_likely_impl_unittest.cc
@@ -149,7 +149,7 @@ class TopSitesLikelyImplTest : public HistoryUnitTestBase {
virtual void SetUp() {
profile_.reset(new TestingProfile);
if (CreateHistoryAndTopSites()) {
- profile_->CreateHistoryService(false, false);
+ ASSERT_TRUE(profile_->CreateHistoryService(false, false));
profile_->CreateTopSites();
profile_->BlockUntilTopSitesLoaded();
}
@@ -361,7 +361,7 @@ class TopSitesLikelyMigrationTest : public TopSitesLikelyImplTest {
data_path.AppendASCII("thumbnails.3.sql"),
profile()->GetPath().Append(chrome::kThumbnailsFilename)));
- profile()->CreateHistoryService(false, false);
+ ASSERT_TRUE(profile()->CreateHistoryService(false, false));
profile()->CreateTopSites();
profile()->BlockUntilTopSitesLoaded();
}
@@ -915,7 +915,7 @@ TEST_F(TopSitesLikelyMigrationTest, Migrate) {
profile()->GetPath().Append(chrome::kThumbnailsFilename)));
// Recreate top sites and make sure everything is still there.
- profile()->CreateHistoryService(false, false);
+ ASSERT_TRUE(profile()->CreateHistoryService(false, false));
RecreateTopSitesAndBlock();
ASSERT_NO_FATAL_FAILURE(MigrationAssertions());
@@ -1208,7 +1208,7 @@ TEST_F(TopSitesLikelyImplTest, CreateTopSitesThenHistory) {
EXPECT_FALSE(IsTopSitesLoaded());
// Load history, which should make TopSites finish loading too.
- profile()->CreateHistoryService(false, false);
+ ASSERT_TRUE(profile()->CreateHistoryService(false, false));
profile()->BlockUntilTopSitesLoaded();
EXPECT_TRUE(IsTopSitesLoaded());
}
@@ -1228,7 +1228,7 @@ class TopSitesLikelyUnloadTest : public TopSitesLikelyImplTest {
// Makes sure if history is unloaded after topsites is loaded we don't hit any
// assertions.
TEST_F(TopSitesLikelyUnloadTest, UnloadHistoryTest) {
- profile()->CreateHistoryService(false, false);
+ ASSERT_TRUE(profile()->CreateHistoryService(false, false));
profile()->CreateTopSites();
profile()->BlockUntilTopSitesLoaded();
HistoryServiceFactory::GetForProfile(
@@ -1251,7 +1251,7 @@ TEST_F(TopSitesLikelyUnloadTest, UnloadWithMigration) {
profile()->GetPath().Append(chrome::kThumbnailsFilename)));
// Create history and block until it's loaded.
- profile()->CreateHistoryService(false, false);
+ ASSERT_TRUE(profile()->CreateHistoryService(false, false));
profile()->BlockUntilHistoryProcessesPendingRequests();
// Create top sites and unload history.
« no previous file with comments | « chrome/browser/history/top_sites_impl_unittest.cc ('k') | chrome/browser/importer/profile_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698