OLD | NEW |
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/user_adding_screen.h" | 10 #include "chrome/browser/chromeos/login/user_adding_screen.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual ~LoginStateNotificationBlockerChromeOSBrowserTest() {} | 32 virtual ~LoginStateNotificationBlockerChromeOSBrowserTest() {} |
33 | 33 |
34 // InProcessBrowserTest overrides: | 34 // InProcessBrowserTest overrides: |
35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
36 LoginManagerTest::SetUpCommandLine(command_line); | 36 LoginManagerTest::SetUpCommandLine(command_line); |
37 command_line->AppendSwitch(::switches::kMultiProfiles); | 37 command_line->AppendSwitch(::switches::kMultiProfiles); |
38 } | 38 } |
39 | 39 |
40 virtual void SetUpOnMainThread() OVERRIDE { | 40 virtual void SetUpOnMainThread() OVERRIDE { |
41 chromeos::LoginState::Get()->set_always_logged_in(false); | 41 chromeos::LoginState::Get()->set_always_logged_in(false); |
| 42 chromeos::LoginManagerTest::SetUpOnMainThread(); |
42 } | 43 } |
43 | 44 |
44 virtual void CleanUpOnMainThread() OVERRIDE { | 45 virtual void CleanUpOnMainThread() OVERRIDE { |
45 if (blocker_) | 46 if (blocker_) |
46 blocker_->RemoveObserver(this); | 47 blocker_->RemoveObserver(this); |
47 blocker_.reset(); | 48 blocker_.reset(); |
48 chromeos::LoginManagerTest::CleanUpOnMainThread(); | 49 chromeos::LoginManagerTest::CleanUpOnMainThread(); |
49 } | 50 } |
50 | 51 |
51 protected: | 52 protected: |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 content::RunAllPendingInMessageLoop(); | 139 content::RunAllPendingInMessageLoop(); |
139 EXPECT_EQ(1, GetStateChangedCountAndReset()); | 140 EXPECT_EQ(1, GetStateChangedCountAndReset()); |
140 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); | 141 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); |
141 | 142 |
142 // Multi-login user switch off. | 143 // Multi-login user switch off. |
143 chromeos::UserAddingScreen::Get()->Cancel(); | 144 chromeos::UserAddingScreen::Get()->Cancel(); |
144 content::RunAllPendingInMessageLoop(); | 145 content::RunAllPendingInMessageLoop(); |
145 EXPECT_EQ(1, GetStateChangedCountAndReset()); | 146 EXPECT_EQ(1, GetStateChangedCountAndReset()); |
146 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); | 147 EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id)); |
147 } | 148 } |
OLD | NEW |