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); | |
36 AshTestBase::SetUp(); | 35 AshTestBase::SetUp(); |
37 display_manager()->AddObserver(this); | 36 display_manager()->AddObserver(this); |
38 Shell::GetPrimaryRootWindow()->AddObserver(this); | 37 Shell::GetPrimaryRootWindow()->AddObserver(this); |
39 } | 38 } |
40 virtual void TearDown() OVERRIDE { | 39 virtual void TearDown() OVERRIDE { |
41 Shell::GetPrimaryRootWindow()->RemoveObserver(this); | 40 Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
42 display_manager()->RemoveObserver(this); | 41 display_manager()->RemoveObserver(this); |
43 AshTestBase::TearDown(); | 42 AshTestBase::TearDown(); |
44 internal::DisplayController::SetExtendedDesktopEnabled(false); | |
45 } | 43 } |
46 | 44 |
47 aura::DisplayManager* display_manager() { | 45 aura::DisplayManager* display_manager() { |
48 return aura::Env::GetInstance()->display_manager(); | 46 return aura::Env::GetInstance()->display_manager(); |
49 } | 47 } |
50 const vector<gfx::Display>& changed() const { return changed_; } | 48 const vector<gfx::Display>& changed() const { return changed_; } |
51 const vector<gfx::Display>& added() const { return added_; } | 49 const vector<gfx::Display>& added() const { return added_; } |
52 | 50 |
53 string GetCountSummary() const { | 51 string GetCountSummary() const { |
54 return StringPrintf("%"PRIuS" %"PRIuS" %"PRIuS, | 52 return StringPrintf("%"PRIuS" %"PRIuS" %"PRIuS, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 UpdateDisplay("1000x600*2"); | 243 UpdateDisplay("1000x600*2"); |
246 EXPECT_EQ(2, | 244 EXPECT_EQ(2, |
247 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); | 245 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); |
248 EXPECT_EQ("500x300", | 246 EXPECT_EQ("500x300", |
249 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); | 247 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); |
250 aura::DisplayManager::set_use_fullscreen_host_window(false); | 248 aura::DisplayManager::set_use_fullscreen_host_window(false); |
251 } | 249 } |
252 | 250 |
253 } // namespace test | 251 } // namespace test |
254 } // namespace ash | 252 } // namespace ash |
OLD | NEW |