summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 19:03:41 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-14 19:03:41 +0000
commit5adcb96e1b42be497be861d437acfa3b75c39d8f (patch)
treef5ca46f1fd9b997700caa65ef80d4e5fb166fe7d /chrome/browser/autocomplete
parentda79bef92a770ba6f8ad3151d78c9ef6486906a4 (diff)
downloadchromium_src-5adcb96e1b42be497be861d437acfa3b75c39d8f.zip
chromium_src-5adcb96e1b42be497be861d437acfa3b75c39d8f.tar.gz
chromium_src-5adcb96e1b42be497be861d437acfa3b75c39d8f.tar.bz2
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
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/history_url_provider_unittest.cc13
1 files changed, 13 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;
}