diff options
-rw-r--r-- | chrome/browser/autocomplete/history_url_provider_unittest.cc | 13 | ||||
-rw-r--r-- | chrome/chrome.gyp | 5 |
2 files changed, 18 insertions, 0 deletions
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; } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index f914877..9fca304 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2276,6 +2276,11 @@ ], }], ['OS=="mac"', { + # The test fetches resources which means Mac need the app bundle to + # exist on disk so it can pull from it. + 'dependencies': [ + 'app', + ], 'include_dirs': [ '../third_party/GTM', ], |