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

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

Issue 2131733002: mash: Migrate [Keyboard]Brightness code to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 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
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 23 matching lines...) Expand all
34 } 34 }
35 } 35 }
36 36
37 namespace aura { 37 namespace aura {
38 class RootWindow; 38 class RootWindow;
39 class Window; 39 class Window;
40 class WindowDelegate; 40 class WindowDelegate;
41 } // namespace aura 41 } // namespace aura
42 42
43 namespace ash { 43 namespace ash {
44 class BrightnessControlDelegate;
44 class DisplayManager; 45 class DisplayManager;
45 class SystemTray; 46 class SystemTray;
46 class WmShelf; 47 class WmShelf;
47 48
48 namespace test { 49 namespace test {
49 50
50 class AshTestHelper; 51 class AshTestHelper;
51 class TestScreenshotDelegate; 52 class TestScreenshotDelegate;
52 class TestSystemTrayDelegate; 53 class TestSystemTrayDelegate;
53 #if defined(OS_WIN) 54 #if defined(OS_WIN)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void SetShouldLockScreenBeforeSuspending(bool should_lock); 147 void SetShouldLockScreenBeforeSuspending(bool should_lock);
147 void SetUserAddingScreenRunning(bool user_adding_screen_running); 148 void SetUserAddingScreenRunning(bool user_adding_screen_running);
148 149
149 // Methods to emulate blocking and unblocking user session with given 150 // Methods to emulate blocking and unblocking user session with given
150 // |block_reason|. 151 // |block_reason|.
151 void BlockUserSession(UserSessionBlockReason block_reason); 152 void BlockUserSession(UserSessionBlockReason block_reason);
152 void UnblockUserSession(); 153 void UnblockUserSession();
153 154
154 void DisableIME(); 155 void DisableIME();
155 156
157 void SetBrightnessControlDelegate(
James Cook 2016/07/07 23:08:50 Yeah, I'd prefer to friend the test or tests if th
msw 2016/07/08 01:40:48 Done.
158 std::unique_ptr<BrightnessControlDelegate> brightness_control_delegate);
159
156 private: 160 private:
157 bool setup_called_; 161 bool setup_called_;
158 bool teardown_called_; 162 bool teardown_called_;
159 // |SetUp()| doesn't activate session if this is set to false. 163 // |SetUp()| doesn't activate session if this is set to false.
160 bool start_session_; 164 bool start_session_;
161 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; 165 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_;
162 std::unique_ptr<AshTestHelper> ash_test_helper_; 166 std::unique_ptr<AshTestHelper> ash_test_helper_;
163 std::unique_ptr<ui::test::EventGenerator> event_generator_; 167 std::unique_ptr<ui::test::EventGenerator> event_generator_;
164 #if defined(OS_WIN) 168 #if defined(OS_WIN)
165 ui::ScopedOleInitializer ole_initializer_; 169 ui::ScopedOleInitializer ole_initializer_;
166 #endif 170 #endif
167 171
168 DISALLOW_COPY_AND_ASSIGN(AshTestBase); 172 DISALLOW_COPY_AND_ASSIGN(AshTestBase);
169 }; 173 };
170 174
171 class NoSessionAshTestBase : public AshTestBase { 175 class NoSessionAshTestBase : public AshTestBase {
172 public: 176 public:
173 NoSessionAshTestBase() { set_start_session(false); } 177 NoSessionAshTestBase() { set_start_session(false); }
174 ~NoSessionAshTestBase() override {} 178 ~NoSessionAshTestBase() override {}
175 179
176 private: 180 private:
177 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 181 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
178 }; 182 };
179 183
180 } // namespace test 184 } // namespace test
181 } // namespace ash 185 } // namespace ash
182 186
183 #endif // ASH_TEST_ASH_TEST_BASE_H_ 187 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698