OLD | NEW |
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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
11 #include "ash/display/display_controller.h" | 11 #include "ash/display/display_controller.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "ash/shell/toplevel_window.h" | 13 #include "ash/shell/toplevel_window.h" |
14 #include "ash/test/ash_test_helper.h" | 14 #include "ash/test/ash_test_helper.h" |
15 #include "ash/test/display_manager_test_api.h" | 15 #include "ash/test/display_manager_test_api.h" |
16 #include "ash/test/test_session_state_delegate.h" | 16 #include "ash/test/test_session_state_delegate.h" |
17 #include "ash/test/test_shell_delegate.h" | 17 #include "ash/test/test_shell_delegate.h" |
18 #include "ash/test/test_system_tray_delegate.h" | 18 #include "ash/test/test_system_tray_delegate.h" |
19 #include "ash/wm/coordinate_conversion.h" | 19 #include "ash/wm/coordinate_conversion.h" |
20 #include "ash/wm/window_positioner.h" | 20 #include "ash/wm/window_positioner.h" |
21 #include "base/command_line.h" | 21 #include "base/command_line.h" |
22 #include "content/public/test/web_contents_tester.h" | |
23 #include "ui/aura/client/aura_constants.h" | 22 #include "ui/aura/client/aura_constants.h" |
24 #include "ui/aura/client/screen_position_client.h" | 23 #include "ui/aura/client/screen_position_client.h" |
25 #include "ui/aura/client/window_tree_client.h" | 24 #include "ui/aura/client/window_tree_client.h" |
26 #include "ui/aura/test/event_generator.h" | 25 #include "ui/aura/test/event_generator.h" |
27 #include "ui/aura/test/test_window_delegate.h" | 26 #include "ui/aura/test/test_window_delegate.h" |
28 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
29 #include "ui/aura/window_delegate.h" | 28 #include "ui/aura/window_delegate.h" |
30 #include "ui/aura/window_tree_host.h" | 29 #include "ui/aura/window_tree_host.h" |
31 #include "ui/base/ime/input_method_initializer.h" | 30 #include "ui/base/ime/input_method_initializer.h" |
32 #include "ui/events/gestures/gesture_configuration.h" | 31 #include "ui/events/gestures/gesture_configuration.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const aura::Window* window) const OVERRIDE { | 73 const aura::Window* window) const OVERRIDE { |
75 return aura::client::GetScreenPositionClient(window->GetRootWindow()); | 74 return aura::client::GetScreenPositionClient(window->GetRootWindow()); |
76 } | 75 } |
77 | 76 |
78 private: | 77 private: |
79 DISALLOW_COPY_AND_ASSIGN(AshEventGeneratorDelegate); | 78 DISALLOW_COPY_AND_ASSIGN(AshEventGeneratorDelegate); |
80 }; | 79 }; |
81 | 80 |
82 } // namespace | 81 } // namespace |
83 | 82 |
84 content::WebContents* AshTestViewsDelegate::CreateWebContents( | |
85 content::BrowserContext* browser_context, | |
86 content::SiteInstance* site_instance) { | |
87 return content::WebContentsTester::CreateTestWebContents(browser_context, | |
88 site_instance); | |
89 } | |
90 | |
91 ///////////////////////////////////////////////////////////////////////////// | 83 ///////////////////////////////////////////////////////////////////////////// |
92 | 84 |
93 AshTestBase::AshTestBase() | 85 AshTestBase::AshTestBase() |
94 : setup_called_(false), | 86 : setup_called_(false), |
95 teardown_called_(false), | 87 teardown_called_(false), |
96 start_session_(true) { | 88 start_session_(true) { |
97 #if defined(USE_X11) | 89 #if defined(USE_X11) |
98 // This is needed for tests which use this base class but are run in browser | 90 // This is needed for tests which use this base class but are run in browser |
99 // test binaries so don't get the default initialization in the unit test | 91 // test binaries so don't get the default initialization in the unit test |
100 // suite. | 92 // suite. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 334 |
343 void AshTestBase::UnblockUserSession() { | 335 void AshTestBase::UnblockUserSession() { |
344 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); | 336 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); |
345 SetSessionStarted(true); | 337 SetSessionStarted(true); |
346 SetUserAddingScreenRunning(false); | 338 SetUserAddingScreenRunning(false); |
347 } | 339 } |
348 | 340 |
349 | 341 |
350 } // namespace test | 342 } // namespace test |
351 } // namespace ash | 343 } // namespace ash |
OLD | NEW |