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

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

Issue 2072023003: mash: Break ash system tray dependencies on ash::ShelfWidget (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 unified diff | Download patch
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 class AshTestBase : public testing::Test { 57 class AshTestBase : public testing::Test {
58 public: 58 public:
59 AshTestBase(); 59 AshTestBase();
60 ~AshTestBase() override; 60 ~AshTestBase() override;
61 61
62 // testing::Test: 62 // testing::Test:
63 void SetUp() override; 63 void SetUp() override;
64 void TearDown() override; 64 void TearDown() override;
65 65
66 // Returns the system tray on the primary display.
67 static SystemTray* GetPrimarySystemTray();
68
66 // Update the display configuration as given in |display_specs|. 69 // Update the display configuration as given in |display_specs|.
67 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. 70 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details.
68 void UpdateDisplay(const std::string& display_specs); 71 void UpdateDisplay(const std::string& display_specs);
69 72
70 // Returns a root Window. Usually this is the active root Window, but that 73 // Returns a root Window. Usually this is the active root Window, but that
71 // method can return NULL sometimes, and in those cases, we fall back on the 74 // method can return NULL sometimes, and in those cases, we fall back on the
72 // primary root Window. 75 // primary root Window.
73 aura::Window* CurrentContext(); 76 aura::Window* CurrentContext();
74 77
75 // Versions of the functions in aura::test:: that go through our shell 78 // Versions of the functions in aura::test:: that go through our shell
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 static WmShelf* GetPrimaryShelf(); 125 static WmShelf* GetPrimaryShelf();
123 126
124 void set_start_session(bool start_session) { start_session_ = start_session; } 127 void set_start_session(bool start_session) { start_session_ = start_session; }
125 128
126 AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); } 129 AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
127 130
128 void RunAllPendingInMessageLoop(); 131 void RunAllPendingInMessageLoop();
129 132
130 TestScreenshotDelegate* GetScreenshotDelegate(); 133 TestScreenshotDelegate* GetScreenshotDelegate();
131 134
132 // Returns the system tray on the primary display.
133 SystemTray* GetPrimarySystemTray();
134
135 TestSystemTrayDelegate* GetSystemTrayDelegate(); 135 TestSystemTrayDelegate* GetSystemTrayDelegate();
136 136
137 // Utility methods to emulate user logged in or not, session started or not 137 // Utility methods to emulate user logged in or not, session started or not
138 // and user able to lock screen or not cases. 138 // and user able to lock screen or not cases.
139 void SetSessionStarted(bool session_started); 139 void SetSessionStarted(bool session_started);
140 // Sets the SessionState to active, marking the begining of transitioning to 140 // Sets the SessionState to active, marking the begining of transitioning to
141 // a user session. The session is considered blocked until SetSessionStarted 141 // a user session. The session is considered blocked until SetSessionStarted
142 // is called. 142 // is called.
143 void SetSessionStarting(); 143 void SetSessionStarting();
144 void SetUserLoggedIn(bool user_logged_in); 144 void SetUserLoggedIn(bool user_logged_in);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ~NoSessionAshTestBase() override {} 176 ~NoSessionAshTestBase() override {}
177 177
178 private: 178 private:
179 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 179 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
180 }; 180 };
181 181
182 } // namespace test 182 } // namespace test
183 } // namespace ash 183 } // namespace ash
184 184
185 #endif // ASH_TEST_ASH_TEST_BASE_H_ 185 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698