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_manager.h" | 5 #include "ash/display/display_manager.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
10 #include "ash/display/display_layout_store.h" | 10 #include "ash/display/display_layout_store.h" |
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 Shell::GetScreen()->GetPrimaryDisplay().id(), 0.8f); | 1754 Shell::GetScreen()->GetPrimaryDisplay().id(), 0.8f); |
1755 | 1755 |
1756 ASSERT_DOUBLE_EQ( | 1756 ASSERT_DOUBLE_EQ( |
1757 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); | 1757 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); |
1758 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); | 1758 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); |
1759 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); | 1759 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); |
1760 | 1760 |
1761 DisplayInfo::SetUse125DSFForUIScaling(false); | 1761 DisplayInfo::SetUse125DSFForUIScaling(false); |
1762 } | 1762 } |
1763 | 1763 |
| 1764 TEST_F(DisplayManagerTest, CheckInitializationOfRotationProperty) { |
| 1765 int64_t id = display_manager()->GetDisplayAt(0).id(); |
| 1766 display_manager()->RegisterDisplayProperty(id, gfx::Display::ROTATE_90, 1.0f, |
| 1767 nullptr, gfx::Size(), 1.0f, |
| 1768 ui::COLOR_PROFILE_STANDARD); |
| 1769 |
| 1770 const DisplayInfo& info = display_manager()->GetDisplayInfo(id); |
| 1771 |
| 1772 EXPECT_EQ(gfx::Display::ROTATE_90, |
| 1773 info.GetRotation(gfx::Display::ROTATION_SOURCE_USER)); |
| 1774 EXPECT_EQ(gfx::Display::ROTATE_90, |
| 1775 info.GetRotation(gfx::Display::ROTATION_SOURCE_ACTIVE)); |
| 1776 } |
| 1777 |
1764 #endif // OS_CHROMEOS | 1778 #endif // OS_CHROMEOS |
1765 | 1779 |
1766 } // namespace ash | 1780 } // namespace ash |
OLD | NEW |