Commit b0c7db6f authored by Jiaquan He's avatar Jiaquan He Committed by Commit Bot

app_list: slightly change ServicesCustomizationDocumentTest.

Due to the app list UI migration, ServicesCustomizationDocumentTest.DefaultApps
will require AppListServiceImpl to be initiated. This is a preflight commit
to register more required preferences, and make sure we have a profile manager.

Bug: 733662
Change-Id: I777772cebedf2d7631fcc64c06a42e1933884a51
Reviewed-on: https://chromium-review.googlesource.com/957651Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jiaquan He <hejq@google.com>
Cr-Commit-Position: refs/heads/master@{#542272}
parent 5c3e4e7b
......@@ -13,6 +13,7 @@
#include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h"
#include "chrome/browser/extensions/external_provider_impl.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
#include "chrome/test/base/testing_browser_process.h"
......@@ -202,7 +203,7 @@ class ServicesCustomizationDocumentTest : public testing::Test {
}
TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_);
ServicesCustomizationDocument::RegisterPrefs(local_state_.registry());
RegisterLocalState(local_state_.registry());
}
void TearDown() override {
......@@ -265,7 +266,11 @@ class ServicesCustomizationDocumentTest : public testing::Test {
factory.CreateSyncable(registry.get()));
RegisterUserProfilePrefs(registry.get());
profile_builder.SetPrefService(std::move(prefs));
return profile_builder.Build();
std::unique_ptr<TestingProfile> profile = profile_builder.Build();
// Make sure we have a Profile Manager.
TestingBrowserProcess::GetGlobal()->SetProfileManager(
new ProfileManagerWithoutInit(profile->GetPath()));
return profile;
}
network::TestURLLoaderFactory factory_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment