diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 21:40:00 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 21:40:00 +0000 |
commit | d486a085bd85065f8952d43f20e3f2c622ef7b7a (patch) | |
tree | 6b56ee8893dd1660a3c2ed7a2ecb8a5c8d948441 /chrome/test | |
parent | 740847d37d057d41ea5956ec0cb123a7dbd5b904 (diff) | |
download | chromium_src-d486a085bd85065f8952d43f20e3f2c622ef7b7a.zip chromium_src-d486a085bd85065f8952d43f20e3f2c622ef7b7a.tar.gz chromium_src-d486a085bd85065f8952d43f20e3f2c622ef7b7a.tar.bz2 |
Unittest for fix to allow navigation when there is no history DB.
BUG=25822
TEST=none
Review URL: http://codereview.chromium.org/343067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/testing_profile.cc | 4 | ||||
-rw-r--r-- | chrome/test/testing_profile.h | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc index e787a6b..775f20b 100644 --- a/chrome/test/testing_profile.cc +++ b/chrome/test/testing_profile.cc @@ -104,7 +104,7 @@ TestingProfile::~TestingProfile() { file_util::Delete(path_, true); } -void TestingProfile::CreateHistoryService(bool delete_file) { +void TestingProfile::CreateHistoryService(bool delete_file, bool no_db) { if (history_service_.get()) history_service_->Cleanup(); @@ -116,7 +116,7 @@ void TestingProfile::CreateHistoryService(bool delete_file) { file_util::Delete(path, false); } history_service_ = new HistoryService(this); - history_service_->Init(GetPath(), bookmark_bar_model_.get()); + history_service_->Init(GetPath(), bookmark_bar_model_.get(), no_db); } void TestingProfile::DestroyHistoryService() { diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index 61083af..1a415d5 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -32,9 +32,11 @@ class TestingProfile : public Profile { // Creates the history service. If |delete_file| is true, the history file is // deleted first, then the HistoryService is created. As TestingProfile - // deletes the directory containing the files used by HistoryService, the - // boolean only matters if you're recreating the HistoryService. - void CreateHistoryService(bool delete_file); + // deletes the directory containing the files used by HistoryService, this + // only matters if you're recreating the HistoryService. If |no_db| is true, + // the history backend will fail to initialize its database; this is useful + // for testing error conditions. + void CreateHistoryService(bool delete_file, bool no_db); // Creates the BookmkarBarModel. If not invoked the bookmark bar model is // NULL. If |delete_file| is true, the bookmarks file is deleted first, then |