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

Side by Side Diff: chrome/browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc

Issue 366813007: Removed InProcessBrowserTest::CleanUpOnMainThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed superfluous override. Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/system/system_notifier.h" 6 #include "ash/system/system_notifier.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/chromeos/login/login_manager_test.h" 8 #include "chrome/browser/chromeos/login/login_manager_test.h"
9 #include "chrome/browser/chromeos/login/startup_utils.h" 9 #include "chrome/browser/chromeos/login/startup_utils.h"
10 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 10 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
(...skipping 17 matching lines...) Expand all
28 LoginStateNotificationBlockerChromeOSBrowserTest() 28 LoginStateNotificationBlockerChromeOSBrowserTest()
29 : chromeos::LoginManagerTest(false), 29 : chromeos::LoginManagerTest(false),
30 state_changed_count_(0) {} 30 state_changed_count_(0) {}
31 virtual ~LoginStateNotificationBlockerChromeOSBrowserTest() {} 31 virtual ~LoginStateNotificationBlockerChromeOSBrowserTest() {}
32 32
33 virtual void SetUpOnMainThread() OVERRIDE { 33 virtual void SetUpOnMainThread() OVERRIDE {
34 chromeos::LoginState::Get()->set_always_logged_in(false); 34 chromeos::LoginState::Get()->set_always_logged_in(false);
35 chromeos::LoginManagerTest::SetUpOnMainThread(); 35 chromeos::LoginManagerTest::SetUpOnMainThread();
36 } 36 }
37 37
38 virtual void CleanUpOnMainThread() OVERRIDE { 38 virtual void TearDownOnMainThread() OVERRIDE {
39 if (blocker_) 39 if (blocker_)
40 blocker_->RemoveObserver(this); 40 blocker_->RemoveObserver(this);
41 blocker_.reset(); 41 blocker_.reset();
42 chromeos::LoginManagerTest::CleanUpOnMainThread(); 42 chromeos::LoginManagerTest::TearDownOnMainThread();
43 } 43 }
44 44
45 protected: 45 protected:
46 void CreateBlocker() { 46 void CreateBlocker() {
47 blocker_.reset(new LoginStateNotificationBlockerChromeOS( 47 blocker_.reset(new LoginStateNotificationBlockerChromeOS(
48 message_center::MessageCenter::Get())); 48 message_center::MessageCenter::Get()));
49 blocker_->AddObserver(this); 49 blocker_->AddObserver(this);
50 } 50 }
51 51
52 // message_center::NotificationBlocker::Observer ovverrides: 52 // message_center::NotificationBlocker::Observer ovverrides:
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 content::RunAllPendingInMessageLoop(); 132 content::RunAllPendingInMessageLoop();
133 EXPECT_EQ(1, GetStateChangedCountAndReset()); 133 EXPECT_EQ(1, GetStateChangedCountAndReset());
134 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); 134 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id));
135 135
136 // Multi-login user switch off. 136 // Multi-login user switch off.
137 chromeos::UserAddingScreen::Get()->Cancel(); 137 chromeos::UserAddingScreen::Get()->Cancel();
138 content::RunAllPendingInMessageLoop(); 138 content::RunAllPendingInMessageLoop();
139 EXPECT_EQ(1, GetStateChangedCountAndReset()); 139 EXPECT_EQ(1, GetStateChangedCountAndReset());
140 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); 140 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id));
141 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_probe_browsertest.cc ('k') | chrome/browser/password_manager/password_generation_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698