diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 18:16:57 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 18:16:57 +0000 |
commit | 0330873dbea0fad5199c575a1bcd18fd1b4014a3 (patch) | |
tree | 10d78d53a1fa4bfd616fbd69f602c9bcafc2bbef /chrome | |
parent | ec2a5fcd5f4dd9c574d174132ef5c8611b56e8bf (diff) | |
download | chromium_src-0330873dbea0fad5199c575a1bcd18fd1b4014a3.zip chromium_src-0330873dbea0fad5199c575a1bcd18fd1b4014a3.tar.gz chromium_src-0330873dbea0fad5199c575a1bcd18fd1b4014a3.tar.bz2 |
Make the test "pass" when the internal data is not found.
Review URL: http://codereview.chromium.org/9416
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/importer/importer_unittest.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc index 4a0a8df..d30cdb8 100644 --- a/chrome/browser/importer/importer_unittest.cc +++ b/chrome/browser/importer/importer_unittest.cc @@ -597,6 +597,10 @@ 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(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox2_nss"); @@ -792,6 +796,10 @@ 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(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); file_util::AppendToPath(&data_path, L"firefox3_nss"); |