Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc

Issue 77773002: Ensure the ExtensionSystem is ready before initializing an ExtensionAppModelBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: System -> Service Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service_factory.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
index 53c9200a66368c3877334dcc7621e733140c3763..518c4d733310dbdf2d22c50f9a38ed743ab6d2c6 100644
--- a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
+++ b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
@@ -138,6 +138,8 @@ class ExtensionAppModelBuilderTest : public ExtensionServiceTestBase {
scoped_ptr<TestAppListControllerDelegate> controller_;
scoped_ptr<ExtensionAppModelBuilder> builder_;
+ base::ScopedTempDir second_profile_temp_dir_;
+
private:
DISALLOW_COPY_AND_ASSIGN(ExtensionAppModelBuilderTest);
};
@@ -317,8 +319,11 @@ TEST_F(ExtensionAppModelBuilderTest, SwitchProfile) {
EXPECT_EQ(kDefaultAppCount, model_->item_list()->item_count());
// Switch to a profile with no apps, ensure all apps are removed.
- TestingProfile::Builder profile_builder;
- scoped_ptr<TestingProfile> profile2(profile_builder.Build());
+ ExtensionServiceInitParams params =
+ CreateDefaultInitParamsInTempDir(&second_profile_temp_dir_);
+ scoped_ptr<TestingProfile> profile2 = CreateTestingProfile(params);
+ InitializeExtensionServiceForProfile(params, profile2.get());
+
builder_->SwitchProfile(profile2.get());
EXPECT_EQ(0u, model_->item_list()->item_count());
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service_factory.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698