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

Side by Side Diff: ash/test/ash_test_base.h

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase to get WorkspaceLayoutManagerSoloTest change Created 3 years, 9 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
« no previous file with comments | « ash/test/ash_interactive_ui_test_base.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_
6 #define ASH_TEST_ASH_TEST_BASE_H_ 6 #define ASH_TEST_ASH_TEST_BASE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 namespace ash { 50 namespace ash {
51 class AshTestImplAura; 51 class AshTestImplAura;
52 class SystemTray; 52 class SystemTray;
53 class WmShelf; 53 class WmShelf;
54 54
55 namespace test { 55 namespace test {
56 56
57 class AshTestEnvironment; 57 class AshTestEnvironment;
58 class AshTestHelper; 58 class AshTestHelper;
59 class TestScreenshotDelegate; 59 class TestScreenshotDelegate;
60 class TestSessionControllerClient;
60 class TestSystemTrayDelegate; 61 class TestSystemTrayDelegate;
61 62
62 class AshTestBase : public testing::Test { 63 class AshTestBase : public testing::Test {
63 public: 64 public:
64 AshTestBase(); 65 AshTestBase();
65 ~AshTestBase() override; 66 ~AshTestBase() override;
66 67
67 // testing::Test: 68 // testing::Test:
68 void SetUp() override; 69 void SetUp() override;
69 void TearDown() override; 70 void TearDown() override;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 static display::Display::Rotation GetCurrentInternalDisplayRotation(); 140 static display::Display::Rotation GetCurrentInternalDisplayRotation();
140 141
141 void set_start_session(bool start_session) { start_session_ = start_session; } 142 void set_start_session(bool start_session) { start_session_ = start_session; }
142 143
143 AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); } 144 AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
144 145
145 void RunAllPendingInMessageLoop(); 146 void RunAllPendingInMessageLoop();
146 147
147 TestScreenshotDelegate* GetScreenshotDelegate(); 148 TestScreenshotDelegate* GetScreenshotDelegate();
148 149
150 TestSessionControllerClient* GetSessionControllerClient();
151
149 TestSystemTrayDelegate* GetSystemTrayDelegate(); 152 TestSystemTrayDelegate* GetSystemTrayDelegate();
150 153
151 // Utility methods to emulate user logged in or not, session started or not 154 // Utility methods to emulate user logged in or not, session started or not
152 // and user able to lock screen or not cases. 155 // and user able to lock screen or not cases.
153 void SetSessionStarted(bool session_started); 156 void SetSessionStarted(bool session_started);
154 // Sets the SessionState to active, marking the begining of transitioning to
155 // a user session. The session is considered blocked until SetSessionStarted
156 // is called.
157 void SetSessionStarting();
158 void SetUserLoggedIn(bool user_logged_in); 157 void SetUserLoggedIn(bool user_logged_in);
158 void SetCanLockScreen(bool can_lock);
159 void SetShouldLockScreenAutomatically(bool should_lock); 159 void SetShouldLockScreenAutomatically(bool should_lock);
160 void SetUserAddingScreenRunning(bool user_adding_screen_running); 160 void SetUserAddingScreenRunning(bool user_adding_screen_running);
161 161
162 // Methods to emulate blocking and unblocking user session with given 162 // Methods to emulate blocking and unblocking user session with given
163 // |block_reason|. 163 // |block_reason|.
164 void BlockUserSession(UserSessionBlockReason block_reason); 164 void BlockUserSession(UserSessionBlockReason block_reason);
165 void UnblockUserSession(); 165 void UnblockUserSession();
166 166
167 void DisableIME(); 167 void DisableIME();
168 168
(...skipping 22 matching lines...) Expand all
191 ~NoSessionAshTestBase() override {} 191 ~NoSessionAshTestBase() override {}
192 192
193 private: 193 private:
194 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 194 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
195 }; 195 };
196 196
197 } // namespace test 197 } // namespace test
198 } // namespace ash 198 } // namespace ash
199 199
200 #endif // ASH_TEST_ASH_TEST_BASE_H_ 200 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/test/ash_interactive_ui_test_base.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698