Index: chrome/browser/autocomplete/history_url_provider_unittest.cc |
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc |
index b26c9a0abeb068e27039220771c561ce3538318e..01387518a5ef564a2f02fe8d892212ba17f6934d 100644 |
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc |
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc |
@@ -152,12 +152,12 @@ class HistoryURLProviderTest : public testing::Test, |
// testing::Test |
virtual void SetUp() { |
- SetUpImpl(false); |
+ ASSERT_TRUE(SetUpImpl(false)); |
} |
virtual void TearDown(); |
// Does the real setup. |
- void SetUpImpl(bool no_db); |
+ bool SetUpImpl(bool no_db) WARN_UNUSED_RESULT; |
// Fills test data into the history system. |
void FillData(); |
@@ -195,7 +195,7 @@ class HistoryURLProviderTest : public testing::Test, |
class HistoryURLProviderTestNoDB : public HistoryURLProviderTest { |
protected: |
virtual void SetUp() { |
- SetUpImpl(true); |
+ ASSERT_TRUE(SetUpImpl(true)); |
} |
}; |
@@ -204,9 +204,10 @@ void HistoryURLProviderTest::OnProviderUpdate(bool updated_matches) { |
base::MessageLoop::current()->Quit(); |
} |
-void HistoryURLProviderTest::SetUpImpl(bool no_db) { |
+bool HistoryURLProviderTest::SetUpImpl(bool no_db) { |
profile_.reset(new TestingProfile()); |
- profile_->CreateHistoryService(true, no_db); |
+ if (!(profile_->CreateHistoryService(true, no_db))) |
+ return false; |
if (!no_db) { |
profile_->BlockUntilHistoryProcessesPendingRequests(); |
profile_->BlockUntilHistoryIndexIsRefreshed(); |
@@ -219,6 +220,7 @@ void HistoryURLProviderTest::SetUpImpl(bool no_db) { |
TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
profile_.get(), &HistoryURLProviderTest::CreateTemplateURLService); |
FillData(); |
+ return true; |
} |
void HistoryURLProviderTest::TearDown() { |