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

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

Issue 2314853003: Move ash::DisplayManager switches to ui::display (Closed)
Patch Set: rebased again Created 4 years, 3 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/system/overview/overview_button_tray_unittest.cc ('k') | ash/test/ash_test_helper.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 #include "ash/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/ash_switches.h"
11 #include "ash/common/wm/window_positioner.h" 10 #include "ash/common/wm/window_positioner.h"
12 #include "ash/common/wm_root_window_controller.h" 11 #include "ash/common/wm_root_window_controller.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
14 #include "ash/common/wm_window.h" 13 #include "ash/common/wm_window.h"
15 #include "ash/display/window_tree_host_manager.h" 14 #include "ash/display/window_tree_host_manager.h"
16 #include "ash/ime/input_method_event_handler.h" 15 #include "ash/ime/input_method_event_handler.h"
17 #include "ash/shell.h" 16 #include "ash/shell.h"
18 #include "ash/shell/toplevel_window.h" 17 #include "ash/shell/toplevel_window.h"
19 #include "ash/test/ash_test_environment.h" 18 #include "ash/test/ash_test_environment.h"
20 #include "ash/test/ash_test_helper.h" 19 #include "ash/test/ash_test_helper.h"
21 #include "ash/test/display_manager_test_api.h" 20 #include "ash/test/display_manager_test_api.h"
22 #include "ash/test/test_session_state_delegate.h" 21 #include "ash/test/test_session_state_delegate.h"
23 #include "ash/test/test_shell_delegate.h" 22 #include "ash/test/test_shell_delegate.h"
24 #include "ash/test/test_system_tray_delegate.h" 23 #include "ash/test/test_system_tray_delegate.h"
25 #include "base/command_line.h" 24 #include "base/command_line.h"
26 #include "ui/aura/client/aura_constants.h" 25 #include "ui/aura/client/aura_constants.h"
27 #include "ui/aura/client/screen_position_client.h" 26 #include "ui/aura/client/screen_position_client.h"
28 #include "ui/aura/client/window_tree_client.h" 27 #include "ui/aura/client/window_tree_client.h"
29 #include "ui/aura/test/event_generator_delegate_aura.h" 28 #include "ui/aura/test/event_generator_delegate_aura.h"
30 #include "ui/aura/test/test_window_delegate.h" 29 #include "ui/aura/test/test_window_delegate.h"
31 #include "ui/aura/window.h" 30 #include "ui/aura/window.h"
32 #include "ui/aura/window_delegate.h" 31 #include "ui/aura/window_delegate.h"
33 #include "ui/aura/window_tree_host.h" 32 #include "ui/aura/window_tree_host.h"
34 #include "ui/base/ime/input_method_initializer.h" 33 #include "ui/base/ime/input_method_initializer.h"
35 #include "ui/display/display.h" 34 #include "ui/display/display.h"
35 #include "ui/display/display_switches.h"
36 #include "ui/display/screen.h" 36 #include "ui/display/screen.h"
37 #include "ui/events/gesture_detection/gesture_configuration.h" 37 #include "ui/events/gesture_detection/gesture_configuration.h"
38 #include "ui/gfx/geometry/point.h" 38 #include "ui/gfx/geometry/point.h"
39 #include "ui/wm/core/coordinate_conversion.h" 39 #include "ui/wm/core/coordinate_conversion.h"
40 40
41 #if defined(OS_WIN) 41 #if defined(OS_WIN)
42 #include "base/win/windows_version.h" 42 #include "base/win/windows_version.h"
43 #include "ui/platform_window/win/win_window.h" 43 #include "ui/platform_window/win/win_window.h"
44 #endif 44 #endif
45 45
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 setup_called_ = true; 117 setup_called_ = true;
118 118
119 // Clears the saved state so that test doesn't use on the wrong 119 // Clears the saved state so that test doesn't use on the wrong
120 // default state. 120 // default state.
121 shell::ToplevelWindow::ClearSavedStateForTest(); 121 shell::ToplevelWindow::ClearSavedStateForTest();
122 122
123 // TODO(jamescook): Can we do this without changing command line? 123 // TODO(jamescook): Can we do this without changing command line?
124 // Use the origin (1,1) so that it doesn't over 124 // Use the origin (1,1) so that it doesn't over
125 // lap with the native mouse cursor. 125 // lap with the native mouse cursor.
126 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 126 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
127 if (!command_line->HasSwitch(switches::kAshHostWindowBounds)) { 127 if (!command_line->HasSwitch(::switches::kHostWindowBounds)) {
128 command_line->AppendSwitchASCII(switches::kAshHostWindowBounds, 128 command_line->AppendSwitchASCII(::switches::kHostWindowBounds,
129 "1+1-800x600"); 129 "1+1-800x600");
130 } 130 }
131 #if defined(OS_WIN) 131 #if defined(OS_WIN)
132 ui::test::SetUsePopupAsRootWindowForTest(true); 132 ui::test::SetUsePopupAsRootWindowForTest(true);
133 #endif 133 #endif
134 134
135 ash_test_helper_->SetUp(start_session_, material_mode_); 135 ash_test_helper_->SetUp(start_session_, material_mode_);
136 136
137 Shell::GetPrimaryRootWindow()->Show(); 137 Shell::GetPrimaryRootWindow()->Show();
138 Shell::GetPrimaryRootWindow()->GetHost()->Show(); 138 Shell::GetPrimaryRootWindow()->GetHost()->Show();
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 void AshTestBase::DisableIME() { 372 void AshTestBase::DisableIME() {
373 Shell::GetInstance()->RemovePreTargetHandler( 373 Shell::GetInstance()->RemovePreTargetHandler(
374 Shell::GetInstance() 374 Shell::GetInstance()
375 ->window_tree_host_manager() 375 ->window_tree_host_manager()
376 ->input_method_event_handler()); 376 ->input_method_event_handler());
377 } 377 }
378 378
379 } // namespace test 379 } // namespace test
380 } // namespace ash 380 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/overview/overview_button_tray_unittest.cc ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698