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

Unified Diff: chrome/browser/signin/signin_error_notifier_ash_unittest.cc

Issue 344833004: aura: Make sure TestScreen objects are destroyed properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 6 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 308b977b9c8a2103ca4f43e0930d8ea30aafd7b0..49467450f79203ac008dbbfe253dbbf4391e9638 100644
--- a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
+++ b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
@@ -24,7 +24,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/notification.h"
-#if !defined(OS_CHROMEOS)
+#if defined(OS_WIN)
#include "chrome/browser/ui/ash/ash_util.h"
#include "ui/aura/test/test_screen.h"
#include "ui/gfx/screen.h"
@@ -45,7 +45,7 @@ static const std::string kNotificationId =
"chrome://settings/signin/testuser@test.com";
}
-#if !defined(OS_CHROMEOS)
+#if defined(OS_WIN)
class ScreenTypeDelegateDesktop : public gfx::ScreenTypeDelegate {
public:
ScreenTypeDelegateDesktop() {}
@@ -79,8 +79,8 @@ class SigninErrorNotifierTest : public AshTestBase {
// Set up screen for Windows.
#if defined(OS_WIN)
- aura::TestScreen* test_screen = aura::TestScreen::Create(gfx::Size());
- gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen);
+ test_screen_.reset(aura::TestScreen::Create(gfx::Size()));
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen_.get());
gfx::Screen::SetScreenTypeDelegate(new ScreenTypeDelegateDesktop);
#endif
@@ -92,6 +92,9 @@ class SigninErrorNotifierTest : public AshTestBase {
}
virtual void TearDown() OVERRIDE {
+#if defined(OS_WIN)
+ test_screen_.reset();
+#endif
profile_manager_.reset();
AshTestBase::TearDown();
@@ -105,6 +108,9 @@ class SigninErrorNotifierTest : public AshTestBase {
*message = notification->message();
}
+#if defined(OS_WIN)
+ scoped_ptr<gfx::Screen> test_screen_;
+#endif
scoped_ptr<TestingProfileManager> profile_manager_;
scoped_ptr<TestingProfile> profile_;
SigninErrorController* error_controller_;
« 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