| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/display/mirror_window_controller.h" | 5 #include "ash/display/mirror_window_controller.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| 11 #include "ash/test/display_manager_test_api.h" | 11 #include "ash/test/display_manager_test_api.h" |
| 12 #include "ash/test/mirror_window_test_api.h" | 12 #include "ash/test/mirror_window_test_api.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "ui/aura/test/event_generator.h" | 15 #include "ui/aura/test/event_generator.h" |
| 16 #include "ui/aura/test/test_window_delegate.h" | 16 #include "ui/aura/test/test_window_delegate.h" |
| 17 #include "ui/aura/test/test_windows.h" | 17 #include "ui/aura/test/test_windows.h" |
| 18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 19 #include "ui/aura/window_event_dispatcher.h" | 19 #include "ui/aura/window_event_dispatcher.h" |
| 20 #include "ui/base/hit_test.h" | 20 #include "ui/base/hit_test.h" |
| 21 | 21 |
| 22 namespace ash { | 22 namespace ash { |
| 23 namespace internal { | |
| 24 | 23 |
| 25 namespace { | 24 namespace { |
| 26 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { | 25 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { |
| 27 DisplayInfo info(id, base::StringPrintf("x-%d", static_cast<int>(id)), false); | 26 DisplayInfo info(id, base::StringPrintf("x-%d", static_cast<int>(id)), false); |
| 28 info.SetBounds(bounds); | 27 info.SetBounds(bounds); |
| 29 return info; | 28 return info; |
| 30 } | 29 } |
| 31 | 30 |
| 32 class MirrorOnBootTest : public test::AshTestBase { | 31 class MirrorOnBootTest : public test::AshTestBase { |
| 33 public: | 32 public: |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 279 } |
| 281 | 280 |
| 282 TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) { | 281 TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) { |
| 283 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 282 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
| 284 EXPECT_TRUE(display_manager->IsMirrored()); | 283 EXPECT_TRUE(display_manager->IsMirrored()); |
| 285 RunAllPendingInMessageLoop(); | 284 RunAllPendingInMessageLoop(); |
| 286 test::MirrorWindowTestApi test_api; | 285 test::MirrorWindowTestApi test_api; |
| 287 EXPECT_TRUE(test_api.GetHost()); | 286 EXPECT_TRUE(test_api.GetHost()); |
| 288 } | 287 } |
| 289 | 288 |
| 290 } // namsspace internal | |
| 291 } // namespace ash | 289 } // namespace ash |
| OLD | NEW |