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

Unified Diff: chrome/browser/signin/signin_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
« no previous file with comments | « no previous file | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_error_notifier_ash_unittest.cc
diff --git a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
index ab1ebf385fb80f8f8da20387f82b77689730a36a..3cb2e57be35ba301c01414836f0b61fe752d5f49 100644
--- a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
+++ b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
@@ -80,7 +80,7 @@ class SigninErrorNotifierTest : 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
error_controller_ = SigninErrorControllerFactory::GetForProfile(
@@ -91,6 +91,8 @@ class SigninErrorNotifierTest : public AshTestBase {
void TearDown() override {
#if defined(OS_WIN)
+ gfx::Screen::SetScreenTypeDelegate(nullptr);
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr);
test_screen_.reset();
#endif
profile_manager_.reset();
@@ -109,6 +111,7 @@ class SigninErrorNotifierTest : 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 | « no previous file | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698