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