| 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/display/display_controller.h" | 5 #include "ash/display/display_controller.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_info.h" | 8 #include "ash/display/display_info.h" |
| 9 #include "ash/display/display_layout_store.h" | 9 #include "ash/display/display_layout_store.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 float device_scale_factor) { | 543 float device_scale_factor) { |
| 544 DisplayInfo info(id, "", false); | 544 DisplayInfo info(id, "", false); |
| 545 info.SetBounds(bounds); | 545 info.SetBounds(bounds); |
| 546 info.set_device_scale_factor(device_scale_factor); | 546 info.set_device_scale_factor(device_scale_factor); |
| 547 return info; | 547 return info; |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace | 550 } // namespace |
| 551 | 551 |
| 552 TEST_F(DisplayControllerTest, MirrorToDockedWithFullscreen) { | 552 TEST_F(DisplayControllerTest, MirrorToDockedWithFullscreen) { |
| 553 if (!SupportsMultipleDisplays()) |
| 554 return; |
| 555 |
| 553 // Creates windows to catch activation change event. | 556 // Creates windows to catch activation change event. |
| 554 scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(1)); | 557 scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithId(1)); |
| 555 w1->Focus(); | 558 w1->Focus(); |
| 556 | 559 |
| 557 // Docked mode. | 560 // Docked mode. |
| 558 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); | 561 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); |
| 559 | 562 |
| 560 const DisplayInfo internal_display_info = | 563 const DisplayInfo internal_display_info = |
| 561 CreateDisplayInfo(1, gfx::Rect(0, 0, 500, 500), 2.0f); | 564 CreateDisplayInfo(1, gfx::Rect(0, 0, 500, 500), 2.0f); |
| 562 const DisplayInfo external_display_info = | 565 const DisplayInfo external_display_info = |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetHost())); | 1334 EXPECT_EQ("aura_root_x", GetXWindowName(secondary->GetHost())); |
| 1332 | 1335 |
| 1333 // Switching back to single display. | 1336 // Switching back to single display. |
| 1334 UpdateDisplay("300x400"); | 1337 UpdateDisplay("300x400"); |
| 1335 EXPECT_EQ("aura_root_0", GetXWindowName( | 1338 EXPECT_EQ("aura_root_0", GetXWindowName( |
| 1336 Shell::GetPrimaryRootWindow()->GetHost())); | 1339 Shell::GetPrimaryRootWindow()->GetHost())); |
| 1337 } | 1340 } |
| 1338 #endif | 1341 #endif |
| 1339 | 1342 |
| 1340 } // namespace ash | 1343 } // namespace ash |
| OLD | NEW |