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/multi_display_manager.h" | 5 #include "ash/display/multi_display_manager.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public aura::DisplayObserver, | 25 public aura::DisplayObserver, |
26 public aura::WindowObserver { | 26 public aura::WindowObserver { |
27 public: | 27 public: |
28 MultiDisplayManagerTest() | 28 MultiDisplayManagerTest() |
29 : removed_count_(0U), | 29 : removed_count_(0U), |
30 root_window_destroyed_(false) { | 30 root_window_destroyed_(false) { |
31 } | 31 } |
32 virtual ~MultiDisplayManagerTest() {} | 32 virtual ~MultiDisplayManagerTest() {} |
33 | 33 |
34 virtual void SetUp() OVERRIDE { | 34 virtual void SetUp() OVERRIDE { |
| 35 internal::DisplayController::SetExtendedDesktopEnabled(true); |
35 AshTestBase::SetUp(); | 36 AshTestBase::SetUp(); |
36 display_manager()->AddObserver(this); | 37 display_manager()->AddObserver(this); |
37 Shell::GetPrimaryRootWindow()->AddObserver(this); | 38 Shell::GetPrimaryRootWindow()->AddObserver(this); |
38 } | 39 } |
39 virtual void TearDown() OVERRIDE { | 40 virtual void TearDown() OVERRIDE { |
40 Shell::GetPrimaryRootWindow()->RemoveObserver(this); | 41 Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
41 display_manager()->RemoveObserver(this); | 42 display_manager()->RemoveObserver(this); |
42 AshTestBase::TearDown(); | 43 AshTestBase::TearDown(); |
| 44 internal::DisplayController::SetExtendedDesktopEnabled(false); |
43 } | 45 } |
44 | 46 |
45 aura::DisplayManager* display_manager() { | 47 aura::DisplayManager* display_manager() { |
46 return aura::Env::GetInstance()->display_manager(); | 48 return aura::Env::GetInstance()->display_manager(); |
47 } | 49 } |
48 const vector<gfx::Display>& changed() const { return changed_; } | 50 const vector<gfx::Display>& changed() const { return changed_; } |
49 const vector<gfx::Display>& added() const { return added_; } | 51 const vector<gfx::Display>& added() const { return added_; } |
50 | 52 |
51 string GetCountSummary() const { | 53 string GetCountSummary() const { |
52 return StringPrintf("%"PRIuS" %"PRIuS" %"PRIuS, | 54 return StringPrintf("%"PRIuS" %"PRIuS" %"PRIuS, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 UpdateDisplay("1000x600*2"); | 245 UpdateDisplay("1000x600*2"); |
244 EXPECT_EQ(2, | 246 EXPECT_EQ(2, |
245 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); | 247 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); |
246 EXPECT_EQ("500x300", | 248 EXPECT_EQ("500x300", |
247 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); | 249 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); |
248 aura::DisplayManager::set_use_fullscreen_host_window(false); | 250 aura::DisplayManager::set_use_fullscreen_host_window(false); |
249 } | 251 } |
250 | 252 |
251 } // namespace test | 253 } // namespace test |
252 } // namespace ash | 254 } // namespace ash |
OLD | NEW |