From f36fa4fb51ae8a8b1ccf6871c155700625e599f8 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Fri, 19 Jun 2009 18:23:50 +0000 Subject: linux: make extensions service test pass in Debug. It only passes on the build bots because they still have old directories, I think? AbsolutePath() on POSIX will fail if the path doesn't exist. We let the program march on in that case and the normal error handling (that would handle the non-existent path) make the tests continue to pass. Review URL: http://codereview.chromium.org/132054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18834 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extensions_service.cc | 6 ++---- chrome/browser/extensions/extensions_service_unittest.cc | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'chrome/browser/extensions') diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 2e655d10..07c6fba 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -493,8 +493,7 @@ void ExtensionsServiceBackend::GarbageCollectExtensions( if (!file_util::DirectoryExists(install_directory_)) return; - if (!file_util::AbsolutePath(&install_directory_)) - NOTREACHED(); + file_util::AbsolutePath(&install_directory_); LOG(INFO) << "Loading installed extensions..."; @@ -546,8 +545,7 @@ void ExtensionsServiceBackend::LoadSingleExtension( alert_on_error_ = true; FilePath extension_path = path_in; - if (!file_util::AbsolutePath(&extension_path)) - NOTREACHED(); + file_util::AbsolutePath(&extension_path); LOG(INFO) << "Loading single extension from " << WideToASCII(extension_path.BaseName().ToWStringHack()); diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index 2a4c104..c540ded 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -752,7 +752,7 @@ TEST_F(ExtensionsServiceTest, LoadExtension) { ValidatePrefKeyCount(0); FilePath no_manifest = extensions_path.AppendASCII("bad") - .AppendASCII("no_manifest").AppendASCII("1"); + .AppendASCII("cccccccccccccccccccccccccccccccc").AppendASCII("1"); service_->LoadExtension(no_manifest); loop_.RunAllPending(); EXPECT_EQ(1u, GetErrors().size()); -- cgit v1.1