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

Unified Diff: chrome/browser/sync/sync_error_notifier_ash_unittest.cc

Issue 857283002: Makes a couple of tests reset state appropriately (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak Created 5 years, 11 months 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
Index: chrome/browser/sync/sync_error_notifier_ash_unittest.cc
diff --git a/chrome/browser/sync/sync_error_notifier_ash_unittest.cc b/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
index 8215226ea0b5f3ff734bc37214476664fe38a8df..8de7117f978b8907f7ef49111539992f3cde5f7e 100644
--- a/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
+++ b/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
@@ -108,7 +108,7 @@ class SyncErrorNotifierTest : public AshTestBase {
#if defined(OS_WIN)
test_screen_.reset(aura::TestScreen::Create(gfx::Size()));
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
- gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateDesktop);
+ gfx::Screen::SetScreenTypeDelegate(&screen_type_delegate_);
#endif
service_.reset(new NiceMock<ProfileSyncServiceMock>(profile_));
@@ -129,6 +129,8 @@ class SyncErrorNotifierTest : public AshTestBase {
error_notifier_->Shutdown();
service_.reset();
#if defined(OS_WIN)
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr);
+ gfx::Screen::SetScreenTypeDelegate(nullptr);
test_screen_.reset();
#endif
profile_manager_.reset();
@@ -166,6 +168,7 @@ class SyncErrorNotifierTest : public AshTestBase {
}
#if defined(OS_WIN)
+ ScreenTypeDelegateDesktop screen_type_delegate_;
scoped_ptr<gfx::Screen> test_screen_;
#endif
scoped_ptr<TestingProfileManager> profile_manager_;
« no previous file with comments | « chrome/browser/signin/signin_error_notifier_ash_unittest.cc ('k') | chrome/test/base/view_event_test_platform_part_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698