diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-10 15:06:38 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-10 15:06:38 +0000 |
commit | 81f3095725e27bc914f5ce85d99a929f76a347d3 (patch) | |
tree | 717d91db4e3f42414ee2a12458f0e7722c771003 | |
parent | 6081f24f3ac3bdaec7a41991f98444103b6c02ab (diff) | |
download | chromium_src-81f3095725e27bc914f5ce85d99a929f76a347d3.zip chromium_src-81f3095725e27bc914f5ce85d99a929f76a347d3.tar.gz chromium_src-81f3095725e27bc914f5ce85d99a929f76a347d3.tar.bz2 |
Fix tests ImporterTest.Firefox2Importer and Firefox3Importer.
BUG=4185
Review URL: http://codereview.chromium.org/9484
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5106 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/importer/importer_unittest.cc | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc index a6094fc..2f9d8e1 100644 --- a/chrome/browser/importer/importer_unittest.cc +++ b/chrome/browser/importer/importer_unittest.cc @@ -601,21 +601,22 @@ TEST_F(ImporterTest, Firefox2Importer) { std::wstring data_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox2_profile\\*"); - if (!file_util::PathExists(data_path)) { - LOG(ERROR) << L"Missing internal test data"; - return; - } - file_util::CopyDirectory(data_path, profile_path_, true); + ASSERT_TRUE(file_util::CopyDirectory(data_path, profile_path_, true)); ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox2_nss"); - file_util::CopyDirectory(data_path, profile_path_, false); + ASSERT_TRUE(file_util::CopyDirectory(data_path, profile_path_, false)); std::wstring search_engine_path = app_path_; file_util::AppendToPath(&search_engine_path, L"searchplugins"); CreateDirectory(search_engine_path.c_str(), NULL); ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox2_searchplugins"); - file_util::CopyDirectory(data_path, search_engine_path, false); + if (!file_util::PathExists(data_path)) { + // TODO(maruel): Create test data that we can open source! + LOG(ERROR) << L"Missing internal test data"; + return; + } + ASSERT_TRUE(file_util::CopyDirectory(data_path, search_engine_path, false)); MessageLoop* loop = MessageLoop::current(); scoped_refptr<ImporterHost> host = new ImporterHost(loop); @@ -802,21 +803,22 @@ TEST_F(ImporterTest, Firefox3Importer) { std::wstring data_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox3_profile\\*"); - if (!file_util::PathExists(data_path)) { - LOG(ERROR) << L"Missing internal test data"; - return; - } - file_util::CopyDirectory(data_path, profile_path_, true); + ASSERT_TRUE(file_util::CopyDirectory(data_path, profile_path_, true)); ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox3_nss"); - file_util::CopyDirectory(data_path, profile_path_, false); + ASSERT_TRUE(file_util::CopyDirectory(data_path, profile_path_, false)); std::wstring search_engine_path = app_path_; file_util::AppendToPath(&search_engine_path, L"searchplugins"); CreateDirectory(search_engine_path.c_str(), NULL); ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox3_searchplugins"); - file_util::CopyDirectory(data_path, search_engine_path, false); + if (!file_util::PathExists(data_path)) { + // TODO(maruel): Create test data that we can open source! + LOG(ERROR) << L"Missing internal test data"; + return; + } + ASSERT_TRUE(file_util::CopyDirectory(data_path, search_engine_path, false)); MessageLoop* loop = MessageLoop::current(); ProfileInfo profile_info; |