From 5adcb96e1b42be497be861d437acfa3b75c39d8f Mon Sep 17 00:00:00 2001 From: "thomasvl@chromium.org" Date: Tue, 14 Apr 2009 19:03:41 +0000 Subject: The history tests relies on being about to reset a profile, which means we need to load a bunch of resources. For the Mac, this means we build the app first and the unittest looks into the app bundle to pull resources. Review URL: http://codereview.chromium.org/73046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13686 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/autocomplete/history_url_provider_unittest.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'chrome/browser/autocomplete') diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc index 6f12cc9..7d2ee0b 100644 --- a/chrome/browser/autocomplete/history_url_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc @@ -11,6 +11,9 @@ #include "chrome/browser/history/history.h" #include "chrome/test/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" +#if defined(OS_MACOSX) +#include "base/mac_util.h" +#endif using base::Time; using base::TimeDelta; @@ -117,6 +120,13 @@ void HistoryURLProviderTest::OnProviderUpdate(bool updated_matches) { } void HistoryURLProviderTest::SetUp() { +#if defined(OS_MACOSX) + FilePath path; + PathService::Get(base::DIR_EXE, &path); + path = path.AppendASCII("Chromium.app"); + mac_util::SetOverrideAppBundlePath(path); +#endif + profile_.reset(new TestingProfile()); profile_->CreateBookmarkModel(true); profile_->CreateHistoryService(true); @@ -128,6 +138,9 @@ void HistoryURLProviderTest::SetUp() { } void HistoryURLProviderTest::TearDown() { +#if defined(OS_MACOSX) + mac_util::SetOverrideAppBundle(NULL); +#endif autocomplete_ = NULL; } -- cgit v1.1