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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 2400553002: ash: Remove broken display notification suppression when settings is open (Closed)
Patch Set: fix comment Created 4 years, 2 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 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/test/ash_test_helper.h" 5 #include "ash/test/ash_test_helper.h"
6 6
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/test/material_design_controller_test_api.h" 9 #include "ash/common/test/material_design_controller_test_api.h"
10 #include "ash/common/test/test_session_state_delegate.h" 10 #include "ash/common/test/test_session_state_delegate.h"
(...skipping 16 matching lines...) Expand all
27 #include "ui/base/material_design/material_design_controller.h" 27 #include "ui/base/material_design/material_design_controller.h"
28 #include "ui/base/test/material_design_controller_test_api.h" 28 #include "ui/base/test/material_design_controller_test_api.h"
29 #include "ui/compositor/scoped_animation_duration_scale_mode.h" 29 #include "ui/compositor/scoped_animation_duration_scale_mode.h"
30 #include "ui/compositor/test/context_factories_for_test.h" 30 #include "ui/compositor/test/context_factories_for_test.h"
31 #include "ui/display/manager/managed_display_info.h" 31 #include "ui/display/manager/managed_display_info.h"
32 #include "ui/message_center/message_center.h" 32 #include "ui/message_center/message_center.h"
33 #include "ui/wm/core/capture_controller.h" 33 #include "ui/wm/core/capture_controller.h"
34 #include "ui/wm/core/cursor_manager.h" 34 #include "ui/wm/core/cursor_manager.h"
35 35
36 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
37 #include "ash/system/chromeos/screen_layout_observer.h"
37 #include "chromeos/audio/cras_audio_handler.h" 38 #include "chromeos/audio/cras_audio_handler.h"
38 #include "chromeos/dbus/dbus_thread_manager.h" 39 #include "chromeos/dbus/dbus_thread_manager.h"
39 #include "device/bluetooth/bluetooth_adapter_factory.h" 40 #include "device/bluetooth/bluetooth_adapter_factory.h"
40 #include "device/bluetooth/dbus/bluez_dbus_manager.h" 41 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
41 #endif 42 #endif
42 43
43 #if defined(OS_WIN) 44 #if defined(OS_WIN)
44 #include "base/win/windows_version.h" 45 #include "base/win/windows_version.h"
45 #endif 46 #endif
46 47
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Shell::CreateInstance(init_params); 131 Shell::CreateInstance(init_params);
131 aura::test::EnvTestHelper(aura::Env::GetInstance()) 132 aura::test::EnvTestHelper(aura::Env::GetInstance())
132 .SetInputStateLookup(std::unique_ptr<aura::InputStateLookup>()); 133 .SetInputStateLookup(std::unique_ptr<aura::InputStateLookup>());
133 134
134 Shell* shell = Shell::GetInstance(); 135 Shell* shell = Shell::GetInstance();
135 if (start_session) { 136 if (start_session) {
136 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true); 137 GetTestSessionStateDelegate()->SetActiveUserSessionStarted(true);
137 GetTestSessionStateDelegate()->SetHasActiveUser(true); 138 GetTestSessionStateDelegate()->SetHasActiveUser(true);
138 } 139 }
139 140
141 #if defined(OS_CHROMEOS)
142 // Tests that change the display configuration generally don't care about the
143 // notifications and the popup UI can interfere with things like cursors.
144 shell->screen_layout_observer()->set_show_notifications_for_testing(false);
145 #endif
146
140 test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) 147 test::DisplayManagerTestApi(Shell::GetInstance()->display_manager())
141 .DisableChangeDisplayUponHostResize(); 148 .DisableChangeDisplayUponHostResize();
142 ShellTestApi(shell).DisableDisplayAnimator(); 149 ShellTestApi(shell).DisableDisplayAnimator();
143 150
144 test_screenshot_delegate_ = new TestScreenshotDelegate(); 151 test_screenshot_delegate_ = new TestScreenshotDelegate();
145 shell->accelerator_controller_delegate()->SetScreenshotDelegate( 152 shell->accelerator_controller_delegate()->SetScreenshotDelegate(
146 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); 153 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
147 } 154 }
148 155
149 void AshTestHelper::TearDown() { 156 void AshTestHelper::TearDown() {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool AshTestHelper::SupportsMultipleDisplays() { 216 bool AshTestHelper::SupportsMultipleDisplays() {
210 #if defined(OS_WIN) 217 #if defined(OS_WIN)
211 return false; 218 return false;
212 #else 219 #else
213 return true; 220 return true;
214 #endif 221 #endif
215 } 222 }
216 223
217 } // namespace test 224 } // namespace test
218 } // namespace ash 225 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | chrome/browser/ui/ash/system_tray_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698