Commit 5741f9a4 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Make ProfileResetterTest.ResetExtensionsAndDefaultApps more reliable

Apply the same fix that was applied to
ProfileResetterTest.ResetExtensionsByDisabling in
f1207e30

Bug: 995851
Change-Id: I7355cb199dfcae0017ce11315025f71533c021b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762813
Auto-Submit: Evan Stade <estade@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689041}
parent 3ca6ffec
......@@ -604,15 +604,17 @@ TEST_F(ProfileResetterTest, ResetExtensionsAndDefaultApps) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile());
content::WindowedNotificationObserver theme_change_observer(
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(theme_service));
scoped_refptr<Extension> ext1 = CreateExtension(
base::ASCIIToUTF16("example1"), temp_dir.GetPath(), Manifest::UNPACKED,
extensions::Manifest::TYPE_THEME, false);
service_->FinishInstallationForTest(ext1.get());
// Let ThemeService finish creating the theme pack.
base::RunLoop().RunUntilIdle();
theme_change_observer.Wait();
ThemeService* theme_service =
ThemeServiceFactory::GetForProfile(profile());
EXPECT_FALSE(theme_service->UsingDefaultTheme());
scoped_refptr<Extension> ext2 = CreateExtension(
......
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