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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace { | 24 namespace { |
25 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { | 25 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { |
26 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); |
27 info.SetBounds(bounds); | 27 info.SetBounds(bounds); |
28 return info; | 28 return info; |
29 } | 29 } |
30 | 30 |
31 class MirrorOnBootTest : public test::AshTestBase { | 31 class MirrorOnBootTest : public test::AshTestBase { |
32 public: | 32 public: |
33 MirrorOnBootTest() {} | 33 MirrorOnBootTest() {} |
34 virtual ~MirrorOnBootTest() {} | 34 ~MirrorOnBootTest() override {} |
35 | 35 |
36 virtual void SetUp() override { | 36 void SetUp() override { |
37 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 37 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
38 switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300"); | 38 switches::kAshHostWindowBounds, "1+1-300x300,1+301-300x300"); |
39 CommandLine::ForCurrentProcess()->AppendSwitch( | 39 CommandLine::ForCurrentProcess()->AppendSwitch( |
40 switches::kAshEnableSoftwareMirroring); | 40 switches::kAshEnableSoftwareMirroring); |
41 test::AshTestBase::SetUp(); | 41 test::AshTestBase::SetUp(); |
42 } | 42 } |
43 virtual void TearDown() override { | 43 void TearDown() override { test::AshTestBase::TearDown(); } |
44 test::AshTestBase::TearDown(); | |
45 } | |
46 | 44 |
47 private: | 45 private: |
48 DISALLOW_COPY_AND_ASSIGN(MirrorOnBootTest); | 46 DISALLOW_COPY_AND_ASSIGN(MirrorOnBootTest); |
49 }; | 47 }; |
50 | 48 |
51 } | 49 } |
52 | 50 |
53 typedef test::AshTestBase MirrorWindowControllerTest; | 51 typedef test::AshTestBase MirrorWindowControllerTest; |
54 | 52 |
55 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 278 |
281 TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) { | 279 TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) { |
282 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 280 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
283 EXPECT_TRUE(display_manager->IsMirrored()); | 281 EXPECT_TRUE(display_manager->IsMirrored()); |
284 RunAllPendingInMessageLoop(); | 282 RunAllPendingInMessageLoop(); |
285 test::MirrorWindowTestApi test_api; | 283 test::MirrorWindowTestApi test_api; |
286 EXPECT_TRUE(test_api.GetHost()); | 284 EXPECT_TRUE(test_api.GetHost()); |
287 } | 285 } |
288 | 286 |
289 } // namespace ash | 287 } // namespace ash |
OLD | NEW |